Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!boulder!sunybcs!bingvaxu!leah!itsgw!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.unix.questions Subject: Re: Endian wars - really 386 questi Message-ID: <13123@steinmetz.ge.com> Date: 13 Feb 89 15:02:16 GMT References: <30@microsoft.UUCP> <28200266@mcdurb> <24318@amdcad.AMD.COM> <7877@boring.cwi.nl> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 46 In article <7877@boring.cwi.nl> dik@cwi.nl (Dik T. Winter) writes: | In article <24318@amdcad.AMD.COM> rpw3@amdcad.UUCP (Rob Warnock) writes: | > ... With "xargs", that 10k limit | > becomes a non-issue. Instead of, for example: | > | > $ some_cmd -options `find -print` | > try: | > $ find -print | xargs some_cmd -options | > | But of course the two are equivalent only if "some_cmd -options" uses only | one input file at a time. Try: | cc -o aap `find -print` | And if they are equivalent you could already do: | find -exec some_cmd -options {} \; | (although you have a lot more processes). Do you understand how xargs works? xargs starts the process with all of the arguments which will fit one one command line (unless limited to fewer by options). There is no requirement that only one file at a time be used. In the case where not all the arguemnts will fit on one line, such as I assume you show above, neither xargs, `embedded commands` or $(ksh style commands) will do. Then you grit your teeth and write some ugly thing like: find {selection} -print | echo | while read proglist do cc -c -o $proglist ar r mylib.a *.o rm *.o done && cc -o aap mylib.a I would be the first to agree that this is ugly, and since I typed it by hand without checking it may have some typo. The idea is there, however, that there is no real magic solution to the line length problem. I'd love to have someone say "no, you dummy, here's how to get 90k command lines..." -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me