Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make the list of letters from A to Z and iterate through them in the shell?

Say I want to iterate from letter A to letter Z in csh shell. How do I succinctly do that?

In bash I would do something like

for i in 'A B C ...Z'; do echo $i; done

The point is I don't want to write A through Z, I want something like

[A-Z]

Can you suggest a one line suggestion in AWK or Perl?

like image 212
vehomzzz Avatar asked Sep 22 '09 17:09

vehomzzz


1 Answers

perl -e 'print for "a" .. "z", "A" .. "Z", 0 .. 9'
like image 182
Sinan Ünür Avatar answered Nov 15 '22 06:11

Sinan Ünür