How do you replace a blank line in a file with a certain character using sed?
I have used the following command but it still returns the original input:
What's missing here is the escape character. This will work for you.
sed 's/^$/\>/g' filename
And if you need to delete the empty lines and print others, Try
sed '/^$/d' filename