X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Message-Id: <1335349788.2627.140661067092681.0CBF054A@webmail.messagingengine.com> From: Ronald Fischer To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain Subject: xargs: Why does order of command line switches matter? Date: Wed, 25 Apr 2012 12:29:48 +0200 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Why do I get a different output in the following two invocations of xargs? I had expected that the relative order of the command line switches (-I, -L) would not matter: $ ls | xargs -I DIR -L 1 echo DIR DIR wontprint.txt DIR x.cmd DIR x.pl DIR x.sh $ ls | xargs -L 1 -I DIR echo DIR wontprint.txt x.cmd x.pl x.sh xargs (GNU findutils) 4.5.9 Packaged by Cygwin (4.5.9-2) Ronald -- Ronald Fischer + If a packet hits a pocket on a socket on a port, + and the bus is interrupted and the interrupt's not caught, + then the socket packet pocket has an error to report. + (cited after Peter van der Linden) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple