Help
How to delete all blank rows in log file
Help
How to delete all blank rows in log file
please use the search button of the forums
there are many ways to do that
grep -v ^$ file_name
awk ' length { print }' filename
try using this command
sed '/^$/ d' filename
u can use:
awk 'NF>0' in_file > out_file
You can also use:
print 'g/^$/delete\nwq' | ex filename
or
echo 'g/^$/delete\nwq' | ex filename
The print or echo depends on the shell you use. This will edit the file directly without having to deal with a second file and renaming it back to the original.