Skip to main content
added 220 characters in body
Source Link

This might work for you:

sed 1G file

If you want to insert something after the newline:

sed '1{G;s/$/something/}' file

Or if you sed handles \n:

sed '1s/$/\nsomething/' file

Of course a is even easier:

sed '1a something' file

This might work for you:

sed 1G file

This might work for you:

sed 1G file

If you want to insert something after the newline:

sed '1{G;s/$/something/}' file

Or if you sed handles \n:

sed '1s/$/\nsomething/' file

Of course a is even easier:

sed '1a something' file
Source Link

This might work for you:

sed 1G file