Hackerrank – Getting started with conditionals
Problem Statement A description of the problem can be found on Hackerrank. Solution
1 2 3 4 5 6 7 8 9 |
#!/bin/bash read letter if [[ ("$letter" == "y") || ( "$letter" == "Y" ) ]]; then echo "YES" elif [[ ("$letter" == "n") || ( "$letter" == "N" ) ]]; then echo "NO" fi |
Solution also available on my GitHub.