On 7/5/08, James Bailie <[EMAIL PROTECTED]> wrote:
> Sebastian Tymków wrote:
>
>
> > I've tried with sed -e '/PATTERN/ a\ line' file but this did'n work. There
> > are many axamples in internet but none
> > of them work on FreeBSD.
> >
>
>  The inserted line needs to be on a separate physical line.
>
>  sed -e '/PATTERN/a\
>  line'
>
>  For /bin/csh, you need two backslashes because the shell recognizes
>  backslashes inside single-quotes, which it shouldn't.
>

IIRC, you also need the '-i' flag, even if you do not specify a backup
extension:

sed -i '' -e 's/foo/bar/' myfile

http://www.dev-urandom.com/unix/sed

Regards,


-- 
Glen Barber
http://www.dev-urandom.com/
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to