${(a)…}: Sort array by index
Sort an array in index order.
This is most useful together with the O flag to reverse the sort order.
Links
Examples
- Print an indexed array in reverse order
- Output:
1 2values=(a b c) echo ${(aO)values}1c b a
BashSupport Pro ist eine Zsh IDE mit Unterstützung für ${(a)…} - probieren Sie es jetzt aus!