AnotherAlan
Technical User
Hi All,
Another AWK problem beyond my current skillset.
I have a logfile which I need to retrieve a specific number value from. Unfortunately there is no static column in the log to pull this data from. The only constant is that the value is always in the field after the word "took". I have managed to pull all the relevant data to parse from the log but am now stuck at how to get NF+1 to work.
Example:
2010-12-14 01:42:06,910 [Dispatcher-4] INFO B2B - BEFORE login 729614 for 183445953
2010-12-14 01:42:07,274 [Dispatcher-4] INFO B2B - AFTER login took 364 ms for 183445953
2010-12-14 01:42:07,807 [Dispatcher-4] INFO B2B - BEFORE priceQuote site=20006USDJPY for 183445953
2010-12-14 01:42:08,917 [Dispatcher-4] INFO B2B - AFTER priceQuote site=20006 USDJPY took 1110 ms for 183445953
2010-12-14 01:42:08,918 [Dispatcher-4] INFO B2B - requestQuote : BEFORE call to pricing service
2010-12-14 01:42:09,741 [Dispatcher-4] INFO B2B - requestQuote : AFTER call to pricing service took 823 ms
In this instance I would like to pull 364,1110 and 823.
All help appreciated as always.
Thanks
Another AWK problem beyond my current skillset.
I have a logfile which I need to retrieve a specific number value from. Unfortunately there is no static column in the log to pull this data from. The only constant is that the value is always in the field after the word "took". I have managed to pull all the relevant data to parse from the log but am now stuck at how to get NF+1 to work.
Example:
2010-12-14 01:42:06,910 [Dispatcher-4] INFO B2B - BEFORE login 729614 for 183445953
2010-12-14 01:42:07,274 [Dispatcher-4] INFO B2B - AFTER login took 364 ms for 183445953
2010-12-14 01:42:07,807 [Dispatcher-4] INFO B2B - BEFORE priceQuote site=20006USDJPY for 183445953
2010-12-14 01:42:08,917 [Dispatcher-4] INFO B2B - AFTER priceQuote site=20006 USDJPY took 1110 ms for 183445953
2010-12-14 01:42:08,918 [Dispatcher-4] INFO B2B - requestQuote : BEFORE call to pricing service
2010-12-14 01:42:09,741 [Dispatcher-4] INFO B2B - requestQuote : AFTER call to pricing service took 823 ms
In this instance I would like to pull 364,1110 and 823.
All help appreciated as always.
Thanks