I have a text file in Solaris 10. Sample lines of the text file is attached. It is comma separated line (two field in each line separated by a comma).
But each line's field contents have large number of leading/trailing empty spaces. I could use command to delete empty line:
perl -ni -e 'print if /\S/' /home/.../myfile.txt
How can I write a command that will delete all the leading/trailing blank spaces in each field? sample.txt