We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Getting started with conditionals
Getting started with conditionals
Sort by
recency
|
325 Discussions
|
Please Login in order to post a comment
read X; if [[ X == y ]]; then echo "YES" else echo "NO" fi
A simple solution?
You can also try by this way
read D if [[ "D" == "y" ]]; then echo "YES" elif [[ "D" == "n" ]]; then echo "NO" fi