linux - how to replce empty lines with text using sed -
How can the blank rows change with text using SAL? I tried some tricks of the previous post but it does not work, can some body help me with this?
Example file content -
Linux is an OS. Linux's opensource has different flavors like Firdado, Census etc. in Linux.
I want to change these blank lines with text like Hello.
Just match the start-line, if you just want the empty lines, then just the interval < / P>
sed -e's / ^ $ / hello / g '
If you also want to match lines with spaces,
>sed -e 's / ^ \ s * $ / hello / g'
Comments
Post a Comment