xargs: Why does order of command line switches matter?

Ronald Fischer ynnor@mm.st
Wed Apr 25 10:30:00 GMT 2012

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

xargs (GNU findutils) 4.5.9
Packaged by Cygwin (4.5.9-2)

Ronald Fischer <ronaldf@eml.cc>
+  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

More information about the Cygwin mailing list