Attachment 1551I have a script where a user provides a date, start time and end time. The script will take these values and scan a log file to search for key words in the log file that fall within the time range. When a user uses AM times (Example: 700 to 900 - this is 7am to 9am) as a range or PM times (Example: 1400 to 1600 - this is 2pm to 4pm) as a range the script works fine. when they use an AM start time and a PM end time the script does not function properly. I've attached the script.
Here is the line in question that I"m having problems with if people don't want to look at the entire attached script.
echo "Number of ${shipmentTags[$i]} shipments processed in log file log$logDate/$logFileName is:`cat $logDirectory/log$logDate/$logFileName | awk -F":" '$1$2 >= '"$startTime"' && $1$2 <= '"$endTime"' {print $0}' | grep ${shipmentStrings[$i]} | wc -l`"
Thanks. I've copied here just some dummy data of what the log would look like.
07:00:01.124 dfsdfjsdflkjsdfkljsdflkjEDIRequestServiceModule/Routedasdfkl
07:05:02.123 fsldjfsdfskdfjsdfsdkfjEDIRequestServiceModule/Rouedsdfjsdfj
07:10:33.233 sdkjfasdflkjasdfaskdfjasdfkljEDIRequestServiceModule/Routed
09:30:02.222 sefsklfjsdfljksdfEDIRequestServiceModule/Routedasdfdf
14:00:12.222 sdfsdfsdfsdfsdfsdfEDIRequestServiceModule/Routed sdfsdfs
14:01:22.223 sdfsdfsdfsdfsdfsdfsdfEDIRequestServiceModule/Routed sdfsdfsdf
17:00:22.222 sdfsdfsdfsdfsdfsdfEDIRequestServiceModule/Routedsdfsdfsdf
18:00:33.333 sdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdf