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

Re: 'for' sorted?



Hi,

Le jeu. 22 sept. 2022 à 17:20, Ray Andrews <rayandrews@xxxxxxxxxxx> a écrit :
>      for var in /dev/sd*; do
>      ...
>
> Apart from capturing the output and then sorting it, is is possible for
> 'for' to go thru the input in a sorted way?  I doubt it but she moves in
> mysterious ways so it might just be doable.

Lexical order:

  for var in /dev/sd*(on); do

To see the available sort specifiers, use:

    for var in /dev/sd*(o<tab>

Best regards,

-- 
Jérémie




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