Hello, I have this script and I'm not going to bore you with what it does, but the user must enter 1 or more octal numbers into it and the script has to validate it.
I have this regular expression, against which all parameters will be validated:
When I enter one number, it goes through fine, but when I enter two or more, it doesn't. The way I check parameters against the regex above is:Code:isOctal='^[0-7]+$'
Could it be in the way I try to use "$*" to check ALL parameters or is it my regex? Thanks beforehand.Code:if [[ ! $* =~ $isOctal ]]; then echo "Number(s) entered not in octal format"