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

letter sequences



I'd like to get a sequence of letter in the same way as we can get a sequence of numbers in zsh :
$ echo {04..10}
04 05 06 07 08 09 10

but for letters :
$ echo {a..n}
. a n

It doesn't work, is it possible ?

In bash 3 it can be done like this :
echo {a..n}
a b c d e f g h i j k l m n

I know this
# for X in 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y'; do ...
  $ for (( i = 36#n; i <= 36#y; i++ )); do
  >   print ${$(([##36]i)):l}
  > done
# or in combination with ``dc''
  $ print {$((##n))..$((##y))}P\ 10P | dc
# or with ``eval''
  $ eval print '${$(([##36]'{$((36#n))..$((36#y))}')):l}'
from zsh-lovers

But it is not as simple as echo {a..n} :)

Is there a way to do it ?

Thanks,
Bapt




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