I'm using bash on mac os x 10.4.7 if that makes any difference.
From the man pages:
Code:
[1addr]a\
text Write text to standard output immediately before each attempt to
read a line of input, whether by executing the ``N'' function or
by beginning a new cycle.
I got this to work:
Code:
$ sed -e 'a\
>appended text' sedTest1
The man pages seem to indicate that the text has to be on a separate line. Interestingly, I got different behavior if I left out the -e switch:
Code:
$ sed 'a\
>appended text' sedTest1
In that case, the text was inserted at the beginning of a line starting with line 2:
Quote:
Original text
appended textOriginal text
appended textOriginal text
appended textdialup-1:~/2testing/dir1 user1$
|