Experts,
I have a bash shell script that generates 2 variables that have the current minute and a minute from a log file. Can someone please show me the best way to test if the minutes stray by 5. So basically if:
This is ok:
Last Fitting Min
=============
02
Current Minute
=============
02
This is bad:
Last Fitting Min
=============
02
Current Minute
=============
07
I know how to test if the values are greater than each other. However I am unsure how to check if the value is greater by 5.
I hope I explained this well enough.
Here are the system details.
Kernel: 2.6.18-194.el5
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.