Results 1 to 4 of 4
This is rather foolish but kind of helpful. Does anyone know of command that will display A-Z out on separte lines, for instance the seq command works like this with ...
- 02-06-2007 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 3
command that displays alphabet
This is rather foolish but kind of helpful. Does anyone know of command that will display A-Z out on separte lines, for instance the seq command works like this with numbers. seq 0 9 will display 0 thru 9 on seprate lines. Does anyone know how to do this using letters. Thanks
- 02-06-2007 #2Just Joined!
- Join Date
- Feb 2007
- Location
- Winnipeg, MB
- Posts
- 14
I don't know if there's a way to do this in Linux already, but here's a simple program for you:
#include <iostream>
using namespace std;
int main(void)
{
for (char letter = 'A'; letter <= 'Z'; letter++)
cout << letter << endl;
}//main
1) Save it as az.cpp
2) g++ az.cpp -o az
2.5) If g++ command not found:
su -c 'apt-get update'
su -c 'apt-get install g++'
3) This produces the executable az. Run it with
./az
-Hope this helps,
Dave
- 02-06-2007 #3Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
welcome to the forum
you could use the shell, like this:
for i in A B C ... X Y Z
do
echo $i
donethe sun is new every day (heraclitus)
- 02-07-2007 #4Just Joined!
- Join Date
- Feb 2007
- Posts
- 3
thanks guys
yeah thanks guys i was just looking for a specific command. i will just write it out. I was writing a program that was going to do some character replacement. It would have been nice to just have a seq command for characters that would have been lovely versus typing out A B C D E F G and so on then lower case but oh well. I will get it done. thanks dudes.


Reply With Quote
