So I'm having a bit of a problem when running this command in bash;
echo "$usr_age" | grep "^[0-9]*$" > $null || echo "Please only use numbers in the Age field." || exit 1
When running it, if the "$usr_age" variable has anything that is not a number, it warns the user, but it doesn't exit the script. I also tried changing the last || to && but if I do so it will just exit the script even if the variable is all numbers.
Note: the "$null" variable is just "/dev/null"
Thank you.