I want to validate the sting which one having only A-Z, a-z, *, . ,_ and 0-9 digits. Can anyone send me the program? I tried with following program but its taking all special characters like @ , # % and ^.
echo " Enter Text :"
read text
while [ ! $(echo "$text" | tr -dc '[A-za-z0-9]') ]
do
echo "Character is wrong"
done
The given program is working fine but typeset -R and -L values are not working in linux machine. Is there any other variables to declare this typeset for string in linux?