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