Nguyễn Hồ Ngọc Anh
Member
How do I remove blank space in Unix?
Answer
Simple solution is by using grep (GNU or BSD) command as below.
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.