Date: Sat, 12 May 2001 11:04:42 +0100 From: Brian Somers <brian@Awfulhak.org> To: Dima Dorfman <dima@unixfreak.org> Cc: hackers@FreeBSD.ORG, gad@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: xargs(1) "replstr" patch Message-ID: <200105121004.f4CA4gX91830@hak.lan.Awfulhak.org> In-Reply-To: Message from Dima Dorfman <dima@unixfreak.org> of "Fri, 11 May 2001 18:03:19 PDT." <20010512010319.B3B893E0B@bazooka.unixfreak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I'd suggest going ahead and committing it ASAP - before people start ``discussing'' it again :oI Feel free to blame me for reviewing it !!! > Folks, > > The attached patch adds a "replacement string" feature to xargs(1). > There's a full description in the man page update (also attached), but > the following should demonstrate the new functionality: > > dima@spike% ./xargs -J [] echo CMD LINE [] ARGS < test > CMD LINE this is the contents of the test file ARGS > dima@spike% ./xargs -J [] echo CMD [] LINE ARGS < test > CMD this is the contents of the test file LINE ARGS > dima@spike% ./xargs -J [] echo [] CMD LINE ARGS < test > this is the contents of the test file CMD LINE ARGS > > This is similar to, but not identical to, the -I option described in > SUSv2. The latter allows the replstr ("[]" above) to be attached to > other arguments, and appear multiple times. Furthermore, it implies > '-n 1'. Although the features are similar, they can solve different > problems; even if -I is implemented later, this (-J) would still be > useful. -J also doesn't have the performance implications attached > with -I. > > There was a nice, long thread about this on current a few weeks ago > (topic: "Re: cp -d dir patch for review (or 'xargs'?)"). It was > rather inconclusive, but nobody managed to come up with a way to > *properly* and *easily* imitate this functionality. Writing a script > to do this *properly* (i.e., handle environment growth) isn't as easy > as it sounds (although it's possible, of course). > > The patch is a joint effort between myself and Garance Dorsihn (gad). > > Comments? Suggestions? > > Thanks in advance, > > Dima Dorfman > dima@unixfreak.org [.....] -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105121004.f4CA4gX91830>