Date: Sat, 12 May 2001 13:37:14 +0300 From: Peter Pentchev <roam@orbitel.bg> To: Brian Somers <brian@Awfulhak.org> Cc: Dima Dorfman <dima@unixfreak.org>, hackers@FreeBSD.ORG, gad@FreeBSD.ORG Subject: Re: xargs(1) "replstr" patch Message-ID: <20010512133714.A52713@ringworld.oblivion.bg> In-Reply-To: <200105121004.f4CA4gX91830@hak.lan.Awfulhak.org>; from brian@Awfulhak.org on Sat, May 12, 2001 at 11:04:42AM %2B0100 References: <dima@unixfreak.org> <200105121004.f4CA4gX91830@hak.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Seconded :) G'luck, Peter -- Do you think anybody has ever had *precisely this thought* before? On Sat, May 12, 2001 at 11:04:42AM +0100, Brian Somers wrote: > 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 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?20010512133714.A52713>