You are viewing a single comment's thread. Return to all comments →
read -r x
if ((x == "y")) then echo "YES" elif ((x == "Y")) then echo "YES" elif ((x == "n")) then echo "NO" elif ((x == "N")) then echo "NO" fi
All this does is output yes no matter what I do. Can someone explain what is wrong?
Seems like cookies are disabled on this browser, please enable them to open this website
Getting started with conditionals
You are viewing a single comment's thread. Return to all comments →
read -r x
if ((x == "y")) then echo "YES" elif ((x == "Y")) then echo "YES" elif ((x == "n")) then echo "NO" elif ((x == "N")) then echo "NO" fi
All this does is output yes no matter what I do. Can someone explain what is wrong?