Use egrep
OK so let's say your usernames are saved in a file called users.txt
Do this:
egrep [^A-Za-z] users.txt
This will output all the 'bad' usernames - any line of the file where the username contains characters which are not upper or lower case letters.
Note this also excludes numbers. If you want to allow numbers, change the pattern to:
egrep [^A-Za-z0-9] users.txt
Google 'regex' to learn more about specifying patterns. A brief explanation of the pattern in my example:
in this context, the ^ symbol means we are matching any line that contains something other than the following patterns, which are alphabet uppercase (the A-Z part), then lowercase (a-z) then numbers (0-9).
If you want to capture the results in a file, just do
egrep [^A-Za-z] users.txt > bad_usernames.txt
|