From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4102 invoked by alias); 7 May 2012 15:25:47 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17061 Received: (qmail 2492 invoked from network); 7 May 2012 15:25:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120507082522.ZM10556@torch.brasslantern.com> Date: Mon, 07 May 2012 08:25:22 -0700 In-reply-to: Comments: In reply to Moritz Bunkus "Re: zargs: unexpected, non-xargs behaviour" (May 7, 4:24pm) References: <20120507084141.GA8366@lohen.blott-online.com> <120507071434.ZM10459@torch.brasslantern.com> In-reply-to: Comments: In reply to Moritz Bunkus "Re: zargs: unexpected, non-xargs behaviour" (May 7, 4:26pm) X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: zargs: unexpected, non-xargs behaviour MIME-version: 1.0 Content-type: text/plain; charset=us-ascii [Combining a couple of replies here.] On May 7, 4:14 and 4:24pm, Moritz Bunkus wrote: } } Well, then zargs is not POSIX compliant } ...and also not equivalent to GNU xargs. Well, if you'll pardon the expression, duh. The whole premise of zargs is off the xargs rails because it doesn't read files or count lines. } Also: In GNU xargs "-L" and "-n" have the very, very important } distinction that "-L" implies "-x" while "-n" does not (GNU xargs from } findutils 4.4.2). The more important distinction is that in xargs -L and -n are counting completely different things. In zargs they're both counting the same thing. In fact neither -L nor -n implies -x in zargs (the exit in your example has nothing to do with the -s option, and -x only applies when the -s size is exceeded). } if I read } http://pubs.opengroup.org/onlinepubs/000095399/utilities/xargs.html } right as the POSIX documentation does not mention aborting if there } are more than "-n arg" arguments in total. On the contrary, it talks } about using fewer than "arg" if there are less _during the last } iteration_. True, but again only sensible if "number of lines" and "number of args" mean different things. Because of the way zargs divides up the array of arguments, there's no case in which it will ever do any useful work if the contraints on -n are violated; would you have been less confused if it did nothing and exited with success?