Nguyễn Thuỳ Chi
New member
How do I remove blank spaces in Linux?
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.