Re: Sed in FreeBSD

2008-07-06 Thread Glen Barber
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

Sed in FreeBSD

2008-07-05 Thread Sebastian Tymków
Hi, I'm trying to use sed in script to append file after pattern but I couldn't find any good example how can I do it. 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. Best regards, Sebastian Tymkow

Re: Sed in FreeBSD

2008-07-05 Thread andrew clarke
On Sat 2008-07-05 16:06:39 UTC+0200, Sebastian Tymk?w ([EMAIL PROTECTED]) wrote: I'm trying to use sed in script to append file after pattern but I couldn't find any good example how can I do it. I've tried with sed -e '/PATTERN/ a\ line' file but this did'n work. There are many axamples in

Re: Sed in FreeBSD

2008-07-05 Thread Sahil Tandon
Sebastian Tymk?w [EMAIL PROTECTED] wrote: I'm trying to use sed in script to append file after pattern but I couldn't find any good example how can I do it. Based on sed(1), I think you need something like: sed '/PATTERN/ r file' -- Sahil Tandon [EMAIL PROTECTED]

Re: Sed in FreeBSD

2008-07-05 Thread James Bailie
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