Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Awk or sed guru needed...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Fri May 30, 2003 7:57 pm    Post subject: Awk or sed guru needed... Reply with quote

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.'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum