On 5/22/07, Winston, Rory <rory.winston at bankofamerica.com> wrote:
> Guys
>> Thanks for all the clever solutions. Awk is amazing.
Um...
For these lines:
426 35.555366 165.47.59.89 -> 165.47.191.87 TCP 4326 > 6666 [PSH, ACK]
Seq=33 Ack=27198 Win=64245 Len=11
430 35.690078 165.47.59.89 -> 165.47.191.87 TCP 4326 > 6666 [ACK]
Seq=44 Ack=27370 Win=65535 Len=0
...you want:
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 \3/'
Kevin
--
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.
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!