awk 'NF' my_input > my_output
Delete empty lines using sed.
sed '/^$/d' <input-file> echo "LINE" | sed '/^$/d' echo "$VAR" | sed '/^$/d' sed '/^[[:space:]]*$/d' input_file sed '/^$/d' input > output sed '/^\s*$/d' in > out sed -n '/^\s*$/!p' in.txt > out.txt sed '/^[[:space:]]*$/d' input > output
sed '/^$/d' /tmp/data.txt
sed '/^$/d' /tmp/data.txt > /tmp/output.txt
sed -i '/^$/d' /tmp/data.txt