From owner-freebsd-questions@FreeBSD.ORG Sat Jul 5 14:51:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4326A1065670 for ; Sat, 5 Jul 2008 14:51:50 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from smtp.mel.people.net.au (smtp.mel.people.net.au [218.214.17.98]) by mx1.freebsd.org (Postfix) with SMTP id 7FE1C8FC16 for ; Sat, 5 Jul 2008 14:51:49 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: (qmail 1886 invoked from network); 5 Jul 2008 14:51:47 -0000 Received: from unknown (HELO blizzard.dnsalias.org) (218.215.136.69) by smtp.mel.people.net.au with SMTP; 5 Jul 2008 14:51:47 -0000 Received: by blizzard.dnsalias.org (Postfix, from userid 1001) id DB1F017071; Sun, 6 Jul 2008 00:51:45 +1000 (EST) Date: Sun, 6 Jul 2008 00:51:45 +1000 From: andrew clarke To: Sebastian Tymk?w Message-ID: <20080705145145.GA2782@ozzmosis.com> References: <692660060807050706i6e02fe04t840bc0a2aff1e8ae@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <692660060807050706i6e02fe04t840bc0a2aff1e8ae@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: Sed in FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2008 14:51:50 -0000 On Sat 2008-07-05 16:06:39 UTC+0200, Sebastian Tymk?w (sebastian.tymkow@gmail.com) 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 internet but none of them work on FreeBSD. I'm not too familiar with sed and so am unsure what you're trying to. It looks as though BSD sed is supplied with in the FreeBSD base system. You might want to try GNU sed instead. It's in the Ports tree - textproc/gsed. If neither of them work for you then you've probably made a mistake with your input.