Conditional logic if - else if [ "$rocket_status" = "Failed" ] then rocket-debug "$mission_name" elif [ "$rocket_status" = "Success" ] then echo "This is successful" else echo "The status is not failed or success" fi In if-else, we use ...
Conditional Statement -> Conditional Statement is used to perform a certain task based on some conditions. IF-ELSE #!/bin/bash read -p "Enter Your Age - " age if [ $age -lt 18 ] then echo "You can not vote" else echo "You can vote" ...