Wherein - in fact, on the back of the regular expression matching means indicates, if a match is output, do not match the output 0
[[ $test =~ ^[0-9]+ ]] && echo 1 || echo 0
Wherein - in fact, on the back of the regular expression matching means indicates, if a match is output, do not match the output 0
[[ $test =~ ^[0-9]+ ]] && echo 1 || echo 0