You are viewing a single comment's thread. Return to all comments →
Bash if weird...
Why this is working fine : input N => say NO
if [[ "p" == "y" ]] then echo "YES" elif [[ "p" == "n" ]] then echo "NO" fi
while this is replying YES whatever the input...
if (( "p" == "y" )) then echo "YES" elif (( "p" == "n" )) then echo "NO" fi
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 →
Bash if weird...
Why this is working fine : input N => say NO
if [[ "p" == "y" ]] then echo "YES" elif [[ "p" == "n" ]] then echo "NO" fi
while this is replying YES whatever the input...
if (( "p" == "y" )) then echo "YES" elif (( "p" == "n" )) then echo "NO" fi