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
|
326 Discussions
|
Please Login in order to post a comment
Simple Bash Code ! read A
if [[ A == "y" ]]; then echo YES elif [[ A == "n" ]]; then echo NO else echo "" fi
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