hi friends,
I am new to shell scripting and i am using KSH shell .I would like to automate our daily routine manual tasks .first i ll explain the situation .I will list out the contents of directory named "log" using "ls " and verify whether all the listed files time differences is not more than 30 minutes.if not, i will send the mail. Now , i need to automate this . i think i can take the time[for eg: 00:00 ,00:30,01:00,01:30....23:00] alone by using "awk" command or "date" function how can i compare the time values because i am having approximately[not exactly] 48 files[24/0.5] per day i need to check the time difference between above 48 files[for every 30 minutes once one file will be created ] .based on that i will do some other tasks...
My time stamp is "Jan 28 18:48"
Eg: ls -l log
file 1 00:30 file 2 - file 1 is 30 minutes
file 2 01:00
file 3 01:30 file 3 - file 2 is 30 minutes
can anyone help me ? Thanks in advance .....