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

Re: shuffle array



2019-11-29 04:20:15 +0100, Emanuel Berg:
> How do I shuffle an array?
> 
> I found [1] but it seems like a lot of code?
> Not that that's a problem if that's the way
> it is.
[...]

You can do something like:

array=(/(Ne['reply=("$array[@]")']oe['REPLY=$RANDOM']))

Though that's a bit convoluted.

-- 
Stephane



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