conditionals.ion 786 B

12345678910111213141516171819
  1. true && echo and || echo or
  2. false && echo and || echo or
  3. false || echo false
  4. true && echo true
  5. true || echo cant get here
  6. false && echo cant get here
  7. false || false || echo double or
  8. true && true && echo double and
  9. false || true && echo or and
  10. contains "one two three" two && echo true || echo false
  11. contains "one two three" abc two && echo true || echo false
  12. contains "one two three" foo bar && echo true || echo false
  13. starts-with "one two three" one && echo true || echo false
  14. starts-with "one two three" abc one && echo true || echo false
  15. starts-with "one two three" three && echo true || echo false
  16. ends-with "one two three" three && echo true || echo false
  17. ends-with "one two three" abc three && echo true || echo false
  18. ends-with "one two three" one two && echo true || echo false