remove blank lines in file linux code example Example: sed remove empty lines sed '/^$/d' /tmp/data.txt