The code I have posted is working as designed. It parses out non-alpha characters as the comment indicates:
# Check 4 character alphabetic strings against
# dictionary. First, strip non-alpha characters from
# the string
pwa=$(echo $pw | tr -cd '[:alpha:]') # Delete the complement of the alpahbetic set
The '-c' switch which precedes the delete (d) operand of the translate command specifies (man tr):
-c, --complement
first complement SET1
I'll check out fgrep, thanks.
|