Could any SED expert help out with this small problem?
I have a short SED script which works using a file sedscr:
which works fine with
I'm trying to execute this as a single command:-
but can't get it to work. The first part works, but the second part gives me an error
The '$' is supposed to match the end of the line but seems to be getting misinterpreted.
Can anyone explain what I need to do/
I have a short SED script which works using a file sedscr:
Code:
s/^/echo '/
s/$/' >>fubar/
sed -f sedscr temp
I'm trying to execute this as a single command:-
sed -e "s/^/echo '/" -e "s/$/' >>fubar/" temp
but can't get it to work. The first part works, but the second part gives me an error
Code:
Illegal variable name.
Can anyone explain what I need to do/