On Sat, 2 Mar 2002, Cameron Simpson wrote:

A nice reply on how to clean up a script.

> <FLAME>More important, though, is that xargs suffers from much the same
> design flaw that your original script did - it has quoting bugs, and
> readily mangles unusual filenames a lot like your script was doing. This
> so annoyed me that I NEVER use xargs, and wrote a less "feature rich"
> but also nonmangling version here:
> 
>       http://www.zip.com.au/~cs/scripts/xxargs
> 
> precisely because xargs is a broken piece of junk.</FLAME>

No, it isn't broken.  Just use the tools that are available.  A simple
example is...

    find /usr/share/afterstep/start/Quit/ -type f -print0 | xargs -0 ls -l

Just a directory that happens to have files whose names contain spaces.
"-print0" tells find to separate output with NULL characters instead of
space characters, and "-0" tells xargs to use NULL characters to split
input instead of whitespace.


-- 
Jim Wright, Senior Engineer
Tel: 415-358-2609   Fax: 415-358-2646   Toll Free: 888-PENGUIN
PENGUIN COMPUTING - www.penguincomputing.com



_______________________________________________
Seawolf-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/seawolf-list

Reply via email to