Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. currenttime=$(date +%H%M%S);
  2. peak_time=$(date -d "$peak_time" '+%H%M%S');
  3.  
  4. num1=$(($peak_time-$currenttime))
  5. echo $num1
  6. if [ $num1 < 0 ]
  7. then
  8. echo "peak time is bigger than current"
  9. else
  10. echo "peak time is smaller than now"
  11. fi
  12.  
  13. if [ 10 < 0 ]
  14. then
  15. echo "`peak time is bigger than current`"
  16. else
  17. echo "peak time is smaller than now"
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement