I did try and find the answer online. I cant find inbuilt command to check data type of the read command input.
This is the following script I am noobie creating below. For some reason the comparison is not working when I am inputing int==1.
I have tried comparing to "1" vs 1, but both do not result in True and end up executing the else command?
echo "1. Start Session"
echo "2. Entry Here"
echo "3. Entry here"
read option1
echo "you selected" $option1
if [ $option1 == "1" ]
then
echo "aaaaaaaaaah!!"
else
echo "nooooooooo!"
fi
Why do I get "noooooo!" and how can I change this to "aaaaaaaaah!"
Thank you in advance!!