What's wrong with this syntax? It's part of my 'if' statement but it doesn't seem to pass and it keeps going to the 'else' part.
I thought it says that userid must start with a non-numeric character and is between 6 and 10 characters long (alphanumeric).
$userid|grep -Eq '^[a-zA-Z]?\{6,10\}+$'
if [[ $? -eq 0 ]]; then
..
fi
Also, how do I check that a blank in the first character is also NOT acceptable within the same grep command?? '^[a-zA-Z][^ ]?' didn't seem to do it either.
Gianni