sed remove entire line code example
Example 1: sed remove empty lines
sed '/^$/d' /tmp/data.txt
Example 2: sed remove line containing
sed '/pattern to match/d' ./infile
sed '/^$/d' /tmp/data.txt
sed '/pattern to match/d' ./infile