Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 May 2002 23:21:02 +0000
From:      "J. Mallett" <jmallett@FreeBSD.ORG>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        "J. Mallett" <jmallett@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/sed main.c sed.1
Message-ID:  <20020507232102.GA20078@FreeBSD.ORG>
In-Reply-To: <p0511173eb8fe0c98ead4@[128.113.24.47]>
References:  <200205071832.g47IWJO26790@freefall.freebsd.org> <20020507214610.GA30780@FreeBSD.ORG> <p0511173eb8fe0c98ead4@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 07, 2002 at 07:14:06PM -0400, Garance A Drosihn wrote:
> At 9:46 PM +0000 5/7/02, J. Mallett wrote:
> >On Tue, May 07, 2002 at 11:32:18AM -0700, J. Mallett wrote:
> >> jmallett    2002/05/07 11:32:18 PDT
> >>
> >>   Modified files:
> >>     usr.bin/sed          main.c sed.1
> >>   Log:
> > >   Add a -i option to sed(1) to do inplace editing, to give
> > >   us an alternative to Perl for such things.
> >
> >Patch to remove the "droppings" as jhb put it, if a nil
> >extension is specified.
> >
> >I'll implement a -I option which takes no arguments on
> >top of this, if it looks kosher.
> 
> I am not quite sure we should debate this on the cvs-lists,
> but I don't want to move it to -arch or -hackers just yet
> either...

The CVS lists are as good a place as any.  People who follow
changes to the source tree will read there, and be likely to
bring up any concerns.

I don't know.  I suppose we all know what -i is there to
replace, so making it work like Perl's option is all that
needs done.  All that needs debated is who will hold back
Wollman if -i may or may not take an argument.

> If I think back to the standards definition of 'xargs', the
> capital letter options *require* the extra parameter, and
> the lowercase options do not.  I will admit the lowercase
> options also allow for a screwy "tacked-on optional string",
> but I will ignore that kind of option as we do not want to
> go in that direction.

But it looks like we'll have to with regard to the next:

> Thus, I would suggest that options be '-I <prefix>' or just
> plain '-i', where -i is the same as '-I ""'.

Perl compatability is what everyone is screaming for, and Perl
compatability is what I feel compelled to give.

> I did check sed implementations on a number of platforms,
> and none of them seem to use -i or -I.  I do like to see
> this option to do in-place editing.

It would allow us to eliminate a lot of the build dependencies
on Perl in ports.
-- 
jmallett@FreeBSD.org   | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
"I've never tried to give my life meaning by demeaning you."

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?20020507232102.GA20078>