Date: Sat, 21 Apr 2001 22:32:28 +0100 From: Brian Somers <brian@Awfulhak.org> To: freebsd-current@FreeBSD.ORG Cc: brian@Awfulhak.org Subject: Re: cp -d dir patch for review (or 'xargs'?) Message-ID: <200104212132.f3LLWS549499@hak.lan.Awfulhak.org> In-Reply-To: Message from Oliver Fromme <olli@secnetix.de> of "Sat, 21 Apr 2001 23:12:20 %2B0200." <200104212112.XAA22737@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> Dima Dorfman <dima@unixfreak.org> wrote: > > I don't have a copy of SuSv2 or anything else that defines -I and -i= , > = > http://www.secnetix.de/~olli/susv2/xcu/xargs.html > = > > but from what I can gather, -i is the same as "-I {}" and -I allows > > things like this: > = > Not exactly. The difference is that the option-argument to > -i is optional and -- if present -- has to follow without > whitespace after the -i. This is a violation of the common > utility syntax guidelines, but has been adopted by SUSv2 > because it was widely implemented. > = > So ``-i'' is the same as ``-I {}'', and ``-i[]'' (no space!) > is the same as ``-I []''. I don't think we should adopt these semantics. I'm coming around to = Dima's -Y option - which must have an argument. > Unfortunately, when you use -i or -I, then each line from > stdin is used as a signle argument, and the utility is > invoked once for every line, unless I misunderstand what > SUSv2 is saying. :-( I guess that settles it then. This is a dumb restriction and doesn't = seem to fit in very well with how xargs works. Again, Dima's idea is = IMHO superior. But as I said in my other follow-up, I'm not convinced that the patch = deals with ARG_MAX overflows properly (I may be wrong though). -- = 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-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104212132.f3LLWS549499>