Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!hplabs!hpcc05!hpyhde4!hpycla!hpcuhc!hpcupt3!shankar From: shankar@hpcupt3.cup.hp.com (Shankar Unni) Newsgroups: comp.sys.hp Subject: Re: HP-720 vs IBM-320 vs Sparc2 Message-ID: <48580035@hpcupt3.cup.hp.com> Date: 13 Jun 91 07:29:49 GMT References: <1991Jun6.151807.670@idaho.uucp> Organization: HP India Software Op., Bangalore Lines: 25 In comp.sys.hp, martelli@cadlab.sublink.ORG (Alex Martelli) writes: > Etc etc, well I have a constructive suggestion for you here, use xargs(1): it > will read, for example, filenames from standard input, and pass them on as > commandline arguments in manageable chunks, e.g.: > ls|grep '\.f$'|xargs f77 -c Ah, but beware of xargs. You can't use it, for example, in a Makefile, because: - it will terminate abnormally only if its command argument terminates with -1. No other exit value will cause it to abort. - it returns 1 if it could not execute the command, or if the command returned -1. Else, it returns 0. Always. Regardless of whether any of its invocations of the command failed. This bit one of our customers recently. I couldn't believe it until I read the relevant XOPEN page, but there it was. However, it does make a weird kind of sense. ----- Shankar Unni E-Mail: HP India Software Operation, Bangalore Internet: shankar@india.hp.com Phone : +91-812-261254 x417 UUCP: ...!hplabs!hpda!shankar