From owner-freebsd-current Sat Apr 21 14:32:32 2001 Delivered-To: freebsd-current@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id D033237B424 for ; Sat, 21 Apr 2001 14:32:28 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.3/8.11.3) with ESMTP id f3LLXeb80310 for ; Sat, 21 Apr 2001 22:33:40 +0100 (BST) (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f3LLWS549499; Sat, 21 Apr 2001 22:32:28 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200104212132.f3LLWS549499@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: freebsd-current@FreeBSD.ORG Cc: brian@Awfulhak.org Subject: Re: cp -d dir patch for review (or 'xargs'?) In-Reply-To: Message from Oliver Fromme of "Sat, 21 Apr 2001 23:12:20 +0200." <200104212112.XAA22737@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Sat, 21 Apr 2001 22:32:28 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Dima Dorfman 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 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