delete an empty line unix without sed code example Example: sed remove empty lines sed '/^$/d' /tmp/data.txt