Re: Sed replace doesn't work from shell script
From: Ed Morton (morton_at_lsupcaemnt.com)
Date: 07/26/05
- Next message: Ed Morton: "Re: sed search and replace"
- Previous message: Ajar: "echo commands"
- Next in thread: takarov2003_at_yahoo.com: "Re: Sed replace doesn't work from shell script"
- Reply: takarov2003_at_yahoo.com: "Re: Sed replace doesn't work from shell script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 26 Jul 2005 08:21:34 -0500
takarov2003@yahoo.com wrote:
> 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.
>
It's not obvious what the problem is and since this is the wrong NG
anyway, I'm setting followups to comp.unix.shell (which you should use
in future for sed questions).
Ed.
- Next message: Ed Morton: "Re: sed search and replace"
- Previous message: Ajar: "echo commands"
- Next in thread: takarov2003_at_yahoo.com: "Re: Sed replace doesn't work from shell script"
- Reply: takarov2003_at_yahoo.com: "Re: Sed replace doesn't work from shell script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|