Top Latest Append

pterjan's diary


2007-12-06

  Letter sequence in bash

Someone asked on IRC how to generate a sequence of letters in bash, like seq does for numbers.

An answer was to use jot -w %c 26 a on FreeBSD, but he was on Linux.

I gave an other answer for use with bash 3, and I post it here as it looks like not much people know it :

[pterjan@plop ~]$ echo {a..e}
a b c d e
[pterjan@plop ~]$ echo {a..b}{a..b}
aa ab ba bb

Today's TSUKKOMI(Total: 2) [Add a TSUKKOMI]

  Bapt [In zsh : -=[bapt@wicklow]=(~)> print {a-n} a b c d e f g h i j k l m n or -=[bapt@wicklow]=(~)> print {a-n}{a-n} a..]

  dalfa [Interesting.]


2004|06|07|08|09|11|
2005|01|02|05|06|07|08|09|10|11|12|
2006|01|02|03|06|08|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|12|
2011|02|04|06|
2012|01|05|11|
2013|01|02|04|06|
2014|02|
2015|06|
2017|05|07|12|