Skip site navigation (1)Skip section navigation (2)
Date:      08 May 2002 01:48:32 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        "J. Mallett" <jmallett@FreeBSD.ORG>
Cc:        Garrett Rooney <rooneg@electricjellyfish.net>, Garance A Drosihn <drosih@rpi.edu>, "J. Mallett" <jmallett@FreeBSD.org>, John Baldwin <jhb@FreeBSD.org>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/sed main.c sed.1
Message-ID:  <xzp8z6vikof.fsf@flood.ping.uio.no>
In-Reply-To: <20020507233024.GC20078@FreeBSD.ORG>
References:  <20020507184519.GB28857@FreeBSD.ORG> <XFMail.20020507150637.jhb@FreeBSD.org> <20020507191959.GA26441@FreeBSD.ORG> <p0511173fb8fe1074d26d@[128.113.24.47]> <20020507232301.GB45271@electricjellyfish.net> <20020507233024.GC20078@FreeBSD.ORG>

next in thread | previous in thread | raw e-mail | index | archive | help
"J. Mallett" <jmallett@FreeBSD.ORG> writes:
> I'd go so far as to say we're implementing a superset of Perl's

Surely you mean "subset"

> capabilities in sed(1), and as such, the "old code" provision
> falls in.  After all, if you re-implmeneted a whole utility, you
> would want compatability.  All we want is front-end compatability
> with Perl.  The options.

We don't get that anyway.  The Perl idiom would be 'perl -p -i -e
foo'; sed(1) does not have a -p option (the -p option to Perl
basically means "act like sed(1)").  Also, the most common use for
Perl in ports is to patch files in ${WRKSRC}, where backups aren't
needed.  I vote for having -i take no argument, and optionally adding
a -I option that does take one.

IMHO, the fact that Perl's -i option may or may not take an argument
is a pain in the butt: it means it can't be clustered.  I don't know
how many times I've typed 'perl -pie foo' and been surprised that it
didn't work...

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

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?xzp8z6vikof.fsf>