Hi All,
I have a file that gives me new line/output every 5 minutes. I need to create a script that capture new line/output besides "IN CRON_STATUS", in this case the new output is "begin ------ cron_status.sh - [started] -----------".
I want this script to capture the line starting from "begin ------ cron_status.sh - [started] -----------" until it reads "IN CRON_STATUS" again. If the script notice the "IN CRON_STATUS", it will stop capturing and direct the output to a different file name and rename it to the original name but with timestamp.
Sample;
---------05/21/08-05:00:00-------- IN CRON_STATUS -----------------------------------
---------05/21/08-05:00:00-------- IN CRON_STATUS -----------------------------------
---------05/21/08-05:05:00-------- IN CRON_STATUS -----------------------------------
---------05/21/08-05:05:00-------- IN CRON_STATUS -----------------------------------
---------05/21/08-05:15:00-------- IN CRON_STATUS -----------------------------------
--------------------------------------- begin ------ cron_status.sh - [started] -----------
-
Message Started found in /RCEBTM_appli/RCEBMA/mbox/hubftpa
-
Starting Tuxedo
---------05/21/08-05:15:00-------- IN CRON_STATUS -----------------------------------
---[CRON]---05/21/08-05:15:00-------- Message Started found in /RCEBTM_appli/RCEBMA/log
---[CRON]---05/21/08-05:15:00-------- Starting RCE
---[CRON]---05/21/08-05:15:00-------- Starting RCE servers ...
XXXXX.XXXXX!BBL.21394: 052108: TUXEDO Version 6.5 HP-UX B.11.00 U XXXX/XXXXXXX unlimited-user license.
-
sending file with ftp: success
---------05/21/08-19:55:00-------- IN CRON_STATUS -----------------------------------
---------05/21/08-19:55:00-------- IN CRON_STATUS -----------------------------------
---------05/21/08-20:00:00-------- IN CRON_STATUS -----------------------------------
Please advise.
Thank you in advance.