change-something-or-not.sh 253 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. VALUE=$((RANDOM % 3))
  3. echo "The value we're dealing with is ${VALUE}"
  4. case ${VALUE} in
  5. 0)
  6. echo "All is good."
  7. exit 0
  8. ;;
  9. 1)
  10. echo "Not everything was good, but we fixed it."
  11. exit 0
  12. ;;
  13. 2)
  14. echo "Oh my!" >&2
  15. exit 0
  16. esac