Sed replace doesn't work from shell script



Please accept my apologies if this is not the right place to ask this
question, but it appears that google doesn't echo a group for sed.

my problem is that i have a file I wish to edit on pattern match,
replacing the matched line with another line.

from the command line I do:

teufel# sed '/#auth./c\
> auth replacement' /etc/syslog.conf > syslog.conf

This works fine from the command line. When I put these same lines in
a shell script, i get:

sed: command garbled: /#auth/c\

what am i missing here? substitution sed lines (one-liners) work fine
in the same script.

.



Relevant Pages

  • SHELL Scripts
    ... Not sure where to post this...but I am having some trouble with a Shell Script. ... I am getting an error when I use the CALL command in the shell script. ... echo of the text inputed. ... GOTO EOF ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Sed replace doesnt work from shell script
    ... but it appears that google doesn't echo a group for sed. ... > This works fine from the command line. ... > a shell script, i get: ...
    (comp.lang.awk)
  • Re: Sed replace doesnt work from shell script
    ... but it appears that google doesn't echo a group for sed. ... > This works fine from the command line. ... > a shell script, i get: ...
    (comp.unix.shell)
  • Re: loop and list with bash
    ... On 30 Sep 2004 08:55:35 GMT, Eric Belhomme ... > echo $item ... Check Google for "comp.unix.shell Frequently Asked Questions". ...
    (comp.unix.shell)
  • Basic Shell script question
    ... I have Solaris 9 installed and using a simple shell script. ... The second echo does not print, the cd command fails and quits the ...
    (comp.unix.solaris)