Date: Thu, 9 May 2002 12:18:42 -0400 From: Mike Barcroft <mike@FreeBSD.org> To: "Crist J. Clark" <cjc@FreeBSD.org> Cc: Tony Finch <dot@dotat.at>, Alfred Perlstein <bright@mu.org>, John Baldwin <jhb@FreeBSD.org>, "J. Mallett" <jmallett@FreeBSD.org>, Garrett Rooney <rooneg@electricjellyfish.net>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/sed main.c sed.1 Message-ID: <20020509121842.A22234@espresso.q9media.com> In-Reply-To: <20020508125316.F94469@blossom.cjclark.org>; from cjc@FreeBSD.org on Wed, May 08, 2002 at 12:53:16PM -0700 References: <20020507191959.GA26441@FreeBSD.ORG> <XFMail.20020507153353.jhb@FreeBSD.org> <20020507205541.GL36741@elvis.mu.org> <20020507221134.A26336@chiark.greenend.org.uk> <20020508125316.F94469@blossom.cjclark.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Crist J. Clark <cjc@FreeBSD.org> writes: > Well, since everyone else seems to have an opinion as to the color of > the sed(1) shed... > > I think sed(1) is the wrong tool for this. We already have a tool that > does "inline" editing, ed(1), > > $ ed somefile.txt <<EOF > ,s/blah/blee/ > wq > EOF > > IMHO, it would be much more logical to add an '-i' option to ed(1) and > an '-e' option for command line ed commands, > > $ ed -i old -e ',s/blah/blee/' somefile.txt > > (And the 'wq' are implied by the usage). A lot of the other issues > (handling file operations) are already dealt with in ed(1). I prefer cp(1) for copying files, but I think the -e part is good a idea. For now, ports can just use: `(echo ",s/foo/bar/" ; echo "wq") | ed baz.txt' ...to do search and replace. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020509121842.A22234>