Hoping someone would be kind enough to suggest a solution to a problem i have, and see if maybe i can even do this without a script.
Essentially i have a very large log file, and within it each line had a value called TTMT, and it records a variable number in the following way, so if a message took 20 mseconds it would appear as TTMT {20} or 21 mseconds then TTMT {21}
There are thousands of entries of TTMT in this logfile and i am only concerned with timings above 20 mseconds, so would like to look only at message strings where the number is geater than 20, and append/write them to a seperate file.
I can do a grep 'TTMT {21}' friday.log |more to see each message where its 21 but i would like a way to see anything above 20 and snend to another log > above20.log
I believe i could use awk but can not see a way to do this correctly, is it possible to do the above using awk or/and grep? rather than having to create a script?
Hi, thanks for answer, so each message in the log is written like this, it has a timestamp and then each variable is within a { } Not sure if it has a certain fixed column though? is it a case of each { } = a column so i need to count them to see where TTMT comes? If so i counted and TTMT appears to be the 55th {}
Here is a example line, where it takes TTMT {21} - would like to see any entries like this where TTMT exceeds 20 (majority are below this number)
Hey that is going to work i think, but its actually referencing TTsendQ which is the field before TTMT , how do i move that to TTMT? is it by altering ttmt=$125 to 127 for example?
I changed ttmt to ttmt=$127 and it worked perfect, is just showing the few ttmt above 20 now, many thanks jlliagre, your a star!
P.S using Suse Linux rather than Solaris, but this is more than enough, thanks again