Thanks Kevin. Sed is also amazing :-)
From: Kevin Lyda [mailto:kevin at ie.suberic.net]
Sent: 04 June 2007 17:01
To: Winston, Rory
Cc: ilug at linux.ie
Subject: Re: [ILUG] Sed/Awk Substitution Question
On 5/22/07, Winston, Rory <rory.winston at bankofamerica.com> wrote:
>> Thanks for all the clever solutions. Awk is amazing.
For these lines:
426 35.555366 18.104.22.168 -> 22.214.171.124 TCP 4326 > 6666 [PSH, ACK]
Seq=33 Ack=27198 Win=64245 Len=11
430 35.690078 126.96.36.199 -> 188.8.131.52 TCP 4326 > 6666 [ACK]
Seq=44 Ack=27370 Win=65535 Len=0
426 35.555366 64245
430 35.690078 65535
so therefore sed will work fine:
sed 's/\([0-9][0-9]*\) *\([0-9][0-9\.]*\).*Win=\([0-9][0-9]*\).*/\1 \2
Kevin Lyda - kevin at ie.suberic.net
What's wrong with the US media, example 3,732:
"History will record that [Bush and Blair] saw the threat to the West
posed by terrorism and responded courageously." -David Broder, so-called
Dean of the Washington press corp.
Notice to recipient:
The information in this internet e-mail and any attachments is confidential and may be privileged. It is intended solely for the addressee. If you are not the intended addressee please notify the sender immediately by telephone. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
When addressed to external clients any opinions or advice contained in this internet e-mail are subject to the terms and conditions expressed in any applicable governing terms of business or client engagement letter issued by the pertinent Bank of America group entity.
If this email originates from the U.K. please note that Bank of America, N.A., London Branch and Banc of America Securities Limited are authorised and regulated by the Financial Services Authority.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!