nitecreeper04
09-12-2004, 07:33 PM
I am trying to figure out how t o append a string to the end of a line suing sed. I am able to append the string to the next line but not the end of the file.
Example1: sed '/^Fred /a\
***' datebook.txt > testfile
Fred
***
But what I want to do is
Fred***
I have tried the end of line marker $ but it doesn’t seem to work. Any suggestions on how to do this with sed?
Thx
Example1: sed '/^Fred /a\
***' datebook.txt > testfile
Fred
***
But what I want to do is
Fred***
I have tried the end of line marker $ but it doesn’t seem to work. Any suggestions on how to do this with sed?
Thx