Monday 16 June 2008

Bash: printing the alphabet

(Sorry for the geeky topic, non-geeky readers)

Most have probably run across the "seq" command that will let you generate a list of numbers:
$ seq 1 4
1
2
3
4
But you can do similar with "echo" for a list of letters:

$ echo {a..d}
a b c d
$ echo {a..d}{a..d}
aa ab ac ad ba bb bc bd ca cb cc cd da db dc dd

7 comments:

Anonymous said...

This came in handy, thanks!

Anonymous said...

Thank you. You save my time ;-)

Anonymous said...

Thanks! This helped a lot and made one of my scrips a lot simpler!

Bruce Wayne said...

super awesome. thanks.

Smilyface said...

Great..

Anonymous said...

gr8

thomasjack0888 said...

That's very beneficial to me. By sharing this blog, you have saved a lot of people's time. Thank you for sharing this; it help me a lot.
Source: Social Marketing Agency.