From owner-freebsd-standards@FreeBSD.ORG Thu Sep 1 09:49:36 2005 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDC7916A41F for ; Thu, 1 Sep 2005 09:49:36 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EABB43D49 for ; Thu, 1 Sep 2005 09:49:35 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from [IPv6:::1] (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.3/8.12.9) with ESMTP id j819nYt8035890 for ; Thu, 1 Sep 2005 11:49:34 +0200 (CEST) (envelope-from stb@lassitu.de) Mime-Version: 1.0 (Apple Message framework v734) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: freebsd-standards@freebsd.org From: Stefan Bethke Date: Thu, 1 Sep 2005 11:49:33 +0200 X-Mailer: Apple Mail (2.734) Subject: xargs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 09:49:37 -0000 I've stumbled over the differing behavior of xargs when standard input delivers an immediate end of file: In recent versions of FreeBSD and OpenBSD, I get this: $ xargs echo foo The xargs utility shall construct a command line consisting of the > utility and argument operands specified followed by as many > arguments read in sequence from standard input as fit in length and > number constraints specified by the options. The xargs utility > shall then invoke the constructed command line and wait for its > completion. This sequence shall be repeated [...] I personally prefer the BSD behaviour, but I wonder whether anyone might rely on the SUSv3 behavior? I came across a makefile that assumed BSD behavior, but failed: find . -name "*.orig" | xargs rm because no orig files were found, but rm was executed anyway, with zero arguments. Stefan -- Stefan Bethke Fon +49 170 346 0140