I'm trying to check if an input is an integer and I've gone over it a hundred times but don't see the error in this. Alas it does not work, it triggers the if statement for all inputs (numbers/letters)
read scale
if ! [[ "$scale" =~ "^[0-9]+$" ]]
then
echo "Sorry integers only"
fi
I've played around with the quotes but either missed it or it did nothing. What do I do wrong? Is there an easier way to test if an input is just an INTEGER?