![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Information. Will Appreciate It | rapzkilla | UNIX for Dummies Questions & Answers | 2 | 06-27-2007 11:33 PM |
| I need a ton of information.... | markforsythe | AIX | 1 | 08-02-2004 06:17 AM |
| NEED Some Information!!! | btx | High Level Programming | 1 | 01-25-2004 03:50 PM |
| PHP- Information | SolidSnake | Shell Programming and Scripting | 1 | 11-19-2003 07:59 AM |
| Need information on AIX 5.1.0.2 | TheBlueLady | UNIX for Advanced & Expert Users | 3 | 08-19-2002 06:32 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
caputring information from log
Hello all,
I am pretty new and UNIX scripting. I am trying to write a script that will caputure some information from a log, without opening a log. Can you please point me in the right direction. Thanks, Keyur |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Here is some additional information.
The log would look something like Quote:
Quote:
Keyur |
|
#3
|
|||
|
|||
|
Please let me know if it is not doable. I am assuming it isnt since i havent received any responses yet.
|
|
#4
|
||||
|
||||
|
nawk -v callid=112201 -f fossil.awk myLogFile.log
fossil.awk: Code:
$(NF-1) == "Callid:" && $NF == callid { found=1 }
found && $(NF-1) == "Callid:" && $NF != callid { found=0 }
found
Last edited by vgersh99; 06-21-2006 at 01:40 PM. |
|
#5
|
|||
|
|||
|
Thanks for the help. I am getting error saying:
nawk: division by zero |
|
#6
|
||||
|
||||
|
Quote:
try this: Code:
$(NF-1) == "Callid:" && $NF == callid { found=1 }
found && $(NF-1) == "Callid:" && $NF != callid { found=0 }
{ print }
|
||||
| Google The UNIX and Linux Forums |