You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
PortfolioLink/database/remove_spaces.sh

14 lines
349 B

#!/bin/bash
# Read input file name from command line argument
input_file=$1
# Set output file name
output_file="${input_file%.*}.csv"
# Remove spaces between words in each line and save as CSV
sed 's/ //g' "${input_file}" | tr '\n' ',' > "${output_file}"
echo "" >> "${output_file}"
# Print success message
echo "Output saved to ${output_file}"