8

Bash Question?

view full story
linux-howto

http://www.linuxquestions.org – I've got a script that tests whether or not a user and a group does exist. And I also got the input restricted pretty well. What I am running into is that Im testing the script and only alpha-numeric is allow for must input here, but when I do like this username joe$$ it expands to joe2566 or what evernumber I believe the PID. Question is how do I better or futher restrict the input to not allow $$. It will fail if I do joe$ Code: if [ "${?}" -eq 0 ] && [ -n "${_usr}" ] && [ -n "${_full_name}" ] && [[ "${_usr}" =~ ^[[:alnum:]] (HowTos)