Remove empty lines from files (sed)
Quick example on removing blank lines from a file for future reference:
# cat testfile.txt line1 line2 line3 line4 line5 line6 # sed '/^$/d' -i testfile.txt # cat testfile.txt line1 line2 line3 line4 line5 line6
The only one that seems to be having fun.
by David · January 14, 2014
Quick example on removing blank lines from a file for future reference:
# cat testfile.txt line1 line2 line3 line4 line5 line6 # sed '/^$/d' -i testfile.txt # cat testfile.txt line1 line2 line3 line4 line5 line6
Tags: sed