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:
The following code should work:
sed -i 's/^[[:space:]]*$/string/' foo