Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
letter sequences
- X-seq: zsh-users 12298
- From: Baptiste Daroussin <baptiste.daroussin@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: letter sequences
- Date: Thu, 06 Dec 2007 12:01:11 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:message-id:date:from:to:subject:mime-version:content-type:content-disposition:content-transfer-encoding:user-agent; bh=CYUVey7Uexw3+EDib4V+88XoD2c4R+Ta9r2G4xHWWnU=; b=AXKEYKfJ6Fxm8ypghrtbJ1Qa9URRxU6VHjcCikDMqgE/ivcYw/HV9c9nH+n97EuK4zzMUvTeVAFQI9eDIDsMMqyITqIb+c02p/QyCj/1Mhe5knOxuPSKxJ40JKIPWc1VQU0F+tIQ2tjtSlAGQtH29YFPnfkUxWCpBQxdV7umxOY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-disposition:content-transfer-encoding:user-agent; b=ElHDG8IDsxTORy1smLjhq7SZYuOHDFWEdqm9IV1ApaMIgTAFHa6S4nDstysn/eyUCAZNXcbp/+iO5Q8h/w/FbLgTUD8wOQNnb+tmz5bNW4c+asoFa6CGbHvw+12pZuc0kvdRJLVjct0fjJqYRaRczgcD2FXhqj9iLOF4CE/0+eg=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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