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

Re: lines to array



On 2/13/07, Meino Christian Cramer wrote:
 I am looking for a zsh-like way to put each line of the output for
 example 'ls -l' into an array.
 Is this possible without "looping" ?


How about this:
array=( "${(f)$(ls -l)}" )

That should work.

~Matt



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