ebrostig Bodhisattva
Joined: 20 Jul 2002 Posts: 3152 Location: Orlando, Fl
|
Posted: Fri May 30, 2003 7:47 pm Post subject: Awk or sed guru needed... |
|
|
I need some help to write a simple script
I have several tracefiles, truss output similar to strace, that are enormous. The good thing is that most lines are irrelevant and I want to get rid of those lines.
Here is some typical lines:
Code: |
16875: times(0xFFBE5B30) = 580080489
16875: times(0xFFBE53B0) = 580080489
16875: times(0xFFBE53B0) = 580080489
16875: times(0xFFBE55C0) = 580080489
16875: times(0xFFBE55C0) = 580080489
16875: times(0xFFBE5658) = 580080489
16875: pread64(258, "0602\0\00380 n } 5 9 = @".., 8192, 0x0DCFA000) = 8192
16875: pread64(258, "0602\0\00380 nD2 5 9 > f".., 8192, 0x0DDA4000) = 8192
16875: times(0xFFBECD58) = 580080491
16875: times(0xFFBED1A8) = 580080491
16875: write(12, "02 [\0\006\0\0\0\0\00601".., 603) = 603
16875: read(12, 0x02FE869E, 2064) (sleeping...)
|
I need to get rid of all the lines that contains times(whatever)
I tried a simple awk script that, in my humble opinion should work, but without luck:
Code: |
cat file | awk '!- /times/'
|
What am I doing wrong and even better, what is the correct way of doing this?
Erik _________________ 'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.' |
|