B Bờm Member Jan 6, 2022 #1 How do I remove spaces from a Unix file? Answer Simple solution is by using grep (GNU or BSD) command as below. Remove blank lines (not including lines with spaces). grep . file.txt. Remove completely blank lines (including lines with spaces). grep “S” file.txt.
How do I remove spaces from a Unix file? Answer Simple solution is by using grep (GNU or BSD) command as below. Remove blank lines (not including lines with spaces). grep . file.txt. Remove completely blank lines (including lines with spaces). grep “S” file.txt.