Discussion: Sed advice needed
Afficher un message
Vieux 31/05/2007, 18h30   #1
Piers Kittel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Sed advice needed

Hello all,

I need to delete some words out of a large file containing
information about packets I'm analysing. I know I can use sed to do
this, but haven't really used it before, so am a bit unsure of how to
do it. Two example lines are as of below:

"181","1324.014027","111.111.111.111","111.111.111 .111","RTP","Payload t
ype=ITU-T H.261, SSRC=2008229573, Seq=54520, Time=1725612773, Mark"
"185","1324.078941","111.111.111.111","111.111.111 .111","RTP","Payload t
ype=ITU-T H.261, SSRC=2008229573, Seq=54521, Time=1725616276"

I need to convert the above to the below:

"181","1324.014027","111.111.111.111","111.111.111 .111","RTP","54520"
"185","1324.078941","111.111.111.111","111.111.111 .111","RTP","54521"

What's the best way to do this? I've been reading the man pages of
sed, cut and awk but I can't quite figure out how to do this. Any
ideas?

Thanks very much for your time in advance!

Regards - Piers


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
 
Page generated in 0,04954 seconds with 9 queries