Search This Blog

Wednesday, July 12, 2023

Remove blank/empty lines with awk

 How to remove empty or blank lines with awk.

Example 1:

command | awk '/^s*$/'


Example 2:

awk '/^s*$/' filename