Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh tips plea (tip of the day)



On 2004-07-24 12:42:16 +0000, Geoff Wing wrote:
> Vincent Lefevre <vincent@xxxxxxxxxx> typed:
> : On 2004-07-24 04:32:28 -0400, Atom 'Smasher' wrote:
> :> i thought that's what xargs is for...
> :> 	$ echo {1..30000} | xargs ls
> : Except that
> :   * xargs may be insecure, unless the option -0 is used;
> 
> It's not about insecurity as much as that it doesn't do what you want
> or expect, necessarily.

Probably not with the above line, but I've seen code where xargs could
lead to security problems (e.g. with xargs rm -rf, where the filenames
were not necessarily all controlled by the user).

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Messages sorted by: Reverse Date, Date, Thread, Author