fork(13) download
  1. a='The quick brown fox jumps over the lazy dog.'
  2. b='*fox*'
  3.  
  4. if [[ $a == $b ]]; then
  5. printf '[UQ] %s equals %s\n' "$a" "$b"
  6. else
  7. printf '[UQ] %s does not equal %s\n' "$a" "$b"
  8. fi
  9.  
  10. if [[ $b == $a ]]; then
  11. printf '[UQ] %s equals %s\n' "$b" "$a"
  12. else
  13. printf '[UQ] %s does not equal %s\n' "$b" "$a"
  14. fi
  15.  
  16. if [[ $a == "$b" ]]; then
  17. printf '[Q] %s equals %s\n' "$a" "$b"
  18. else
  19. printf '[Q] %s does not equal %s\n' "$a" "$b"
  20. fi
  21.  
  22. if [[ $b == "$a" ]]; then
  23. printf '[Q] %s equals %s\n' "$b" "$a"
  24. else
  25. printf '[Q] %s does not equal %s\n' "$b" "$a"
  26. fi
Success #stdin #stdout 0.03s 5268KB
stdin
Standard input is empty
stdout
[UQ] The quick brown fox jumps over the lazy dog. equals *fox*
[UQ] *fox* does not equal The quick brown fox jumps over the lazy dog.
[Q] The quick brown fox jumps over the lazy dog. does not equal *fox*
[Q] *fox* does not equal The quick brown fox jumps over the lazy dog.