How do we delete all blank lines in a file?

sed  ‘^ [(backslash)011(backslash)040]*$/d’ file1

where (backslash)011 is octal equivalent of space and

(backslash)040 is octal equivalent of tab

Category: Shell Scripting Interview Questions.