To make [[ $foo =~ ^[0-9]+ ]] succeed only when the whole value of foo is digits, add the ___ anchor character at the e…