On Jan 17, 2008 4:13 AM, Stefan Seifert <[EMAIL PROTECTED]> wrote: > Curtis Olson wrote: > > > Don't bother listening to Melchior, he's busy coming up with absurdly long > > strings of obscure unix commands that are just a huge waste of time to > > type. You can do the same check with this much simpler command and save 26 > > key strokes (if you start in the aircraft directory): > > > > find . -name \*.xml -exec grep -l vsi-3d {} \; > > Well, just for completeness and because Melchior doesn't like -exec: > find . -name \*.xml | xargs grep vsi-3d > does the job just as well and is even simpler to type ;)
But more likely to break. Melchior's original "while read i" bit is not just extra words but a very useful idiom, especially in the presence of the possibility of spaces in filenames (I don't know if that's a concern in FG or not). Yes you could use -print0 and xargs -0 but "while read" is useful in many situations not all of which involve find. I might mention that no matter how quick and clever your shell scripting, from where I sit it's 5 minutes for every flightgear startup. Clearly, if one is short on time, this is the bottleneck. -- Hans Fugal ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel