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

Re: zsh tips plea (tip of the day)



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.

:   * xargs can't always be used for every command;
:   * this requires more things to type (not important for scripts,
:     but this may be annoying when typing commands interactively).

% print -N {1..30000} | xargs -0 ls

That doesn't do exactly the same thing but that's what you've got.
Live with it.  I use it (something like it - ``**/*(.)'') nearly
every day.  It's the same with any Unix-like system.  Everything
has limitations.  It's still a lot better/easier than using find
or similar.

Regards,
Geoff



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