Re: Sed replace doesn't work from shell script
- From: Bob Harris <nospam.News.Bob@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Jul 2005 01:00:13 GMT
In article <1122327610.551790.326920@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
takarov2003@xxxxxxxxx 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.
Do you have any trailing white space following the \ ???
Bob Harris
.
- Follow-Ups:
- Re: Sed replace doesn't work from shell script
- From: takarov2003
- Re: Sed replace doesn't work from shell script
- References:
- Sed replace doesn't work from shell script
- From: takarov2003
- Sed replace doesn't work from shell script
- Prev by Date: Re: Where are my other variables:
- Next by Date: Re: Sed replace doesn't work from shell script
- Previous by thread: Sed replace doesn't work from shell script
- Next by thread: Re: Sed replace doesn't work from shell script
- Index(es):
Relevant Pages
|