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