I need to remove spaces from fields in a CSV file...
Using the following command works, but it does not remove the spaces from any fields in the CSV that are within double quotes -
perl -pi.bak -e "s/\s+,/,/g" file.csv
How would I expand that command so that it also would remove the trailing spaces that are within double quotes?
FYI - I got that command from searching which resulted in this thread -
Using the following command works, but it does not remove the spaces from any fields in the CSV that are within double quotes -
perl -pi.bak -e "s/\s+,/,/g" file.csv
How would I expand that command so that it also would remove the trailing spaces that are within double quotes?
FYI - I got that command from searching which resulted in this thread -