fork download
  1. fixed_time=09:00:01
  2. compare_times=(
  3. 09:00:00
  4. 10:00:00
  5. 24:00:00
  6. 17:00:00
  7. 24:00:00
  8. )
  9.  
  10. for compare_time in "${compare_times[@]}"; do
  11. if [[ $compare_time = $fixed_time ]]; then
  12. echo "$compare_time = $fixed_time"
  13. elif [[ $compare_time < $fixed_time ]]; then
  14. echo "$compare_time < $fixed_time"
  15. elif [[ $compare_time > $fixed_time ]]; then
  16. echo "$compare_time > $fixed_time"
  17. fi
  18. done
  19.  
Success #stdin #stdout 0s 4400KB
stdin
Standard input is empty
stdout
09:00:00 < 09:00:01
10:00:00 > 09:00:01
24:00:00 > 09:00:01
17:00:00 > 09:00:01
24:00:00 > 09:00:01