![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| get Message from file within date range | ambharish | UNIX for Dummies Questions & Answers | 2 | 06-29-2007 05:20 PM |
| compare date with date in file | siog | UNIX for Dummies Questions & Answers | 2 | 10-04-2006 12:10 PM |
| compare today's date with date in a file | siog | UNIX for Dummies Questions & Answers | 4 | 10-04-2006 11:55 AM |
| Report file extraction based on Date range | ganapati | Shell Programming and Scripting | 2 | 07-13-2006 11:26 AM |
| Need to print file names in a certain date range using ls | Shamwari | UNIX for Dummies Questions & Answers | 2 | 10-08-2001 07:14 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Log File date compare for user defined range
Hi i am a noob and need a little help to finish my shell script. I am learning as i go but hit a problem.I am search thorugh logs(*.rv) files to find entires between two user defined dates, The script so far looks for the "START" and "END" of each entry at sees if it belongs To user defined ORGID number. then only take the whole record based on OGID and valid entry in the date range given gawk '/^START/ { ok=0; sec="" } /^START/,/^END/ { sec=sec "\n" $0 }$2==274529 { ok=1 }/^END/ && ok { print sec }' *.rv>BUSORG_ORGID${BUSORG_ORGID}st${START_DAY}${START_MONTH}end${END_DAY}${END_MONTH}.txt extract of one *.rv file START: Mon Apr 24 10:09:19 2006: Mon Apr 24 10:09:19 2006: service: before tpcall(), buffer being sent... G_FLAG 0 CLFY_SUB ListBeneficiaryDetails MESSAGE_ID C7ADAC68-DD9E-497D-BCBD-9654B9AFEDB6 BUSORG_ORGID 281688 service: now I'm sending that... Mon Apr 24 10:09:19 2006: Mon Apr 24 10:09:20 2006: service: after tpcall(), buffer received... E_NUMBER 2 G_FLAG 0 CLFY_SUB ListBeneficiaryDetails E_STRING No record(s) found MESSAGE_ID C7ADAC68-DD9E-497D-BCBD-9654B9AFEDB6 BUSORG_ORGID 281688 service: now I have received that... Mon Apr 24 10:09:20 2006: service: field [XFDTRANSACT_XID2] not found, Ferror 4, tperrno 0 processing ends... Mon Apr 24 10:09:20 2006: END: START: Mon Apr 24 10:09:53 2006: Mon Apr 24 10:09:53 2006: service: before tpcall(), buffer being sent... CLFY_SUB ListLast50CardStatementItems MESSAGE_ID ACDD0695-77CA-4C5F-931A-036075DFF927 BUSORG_ORGID 422345 XPRODUCT_XACCOUNTNO 570203327 XPRODUCT_XCOINTYPE DUAM END: |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|