Is there an awk-like or sed-like command line hack I can issue to generate a list of all keyboard characters (such as a-zA-z0-9!-*, etc)? I'm writing a simple Caesar cipher program in my intro programming class where we do the rotation not through ASCII values, but indexing into an alphabet string, something like this:
String alphabet = "abcdefghijklmnopqrstuvwxyz";
for (int pos = 0; pos < message.length(); pos++) {
char ch = message.charAt(pos);
int chPos = alphabet.indexOf(ch);
char cipherCh = alphabet.charAt(chPos+rotation%alphabet.length());
System.out.print(cipherCh);
}
Clearly I can write a loop in some other language and print all ASCII values, but I'd love something closer to the command line as flashier example.