<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
thanks for your explanation Tet. You are very right :) <br><br><div>> Date: Wed, 28 Sep 2011 15:08:08 +0100<br>> From: tethys@gmail.com<br>> To: gllug@gllug.org.uk<br>> Subject: Re: [Gllug] printing and splitting IPs<br>> <br>> On Wed, Sep 28, 2011 at 2:39 PM, dudes dudes <akam123@hotmail.co.uk> wrote:<br>> <br>> > I've got a file with IPs and port numbers. I'm trying to split this file<br>> > into different separate files based on the IP addresses and associate port<br>> > numbers to file1, file2, file(n+1.) I'm issuing this statement, but it<br>> > failed.<br>> ><br>> > awk '/^*.*.*.*/{close("file"f);f++}{print $0 > "file"f}' file<br>> <br>> You're using a glob pattern, where awk requires regular expressions.<br>> Change it to:<br>> <br>> awk '/^.*\..*\..*\..*/{close("file"f);f++}{print $0 > "file"f}' file<br>> <br>> Tet<br>> <br>> -- <br>> "Java is a DSL for taking large XML files and converting them to stack<br>> traces" -- Bulat Shakirzyanov<br>> --<br>> Gllug mailing list - Gllug@gllug.org.uk<br>> http://lists.gllug.org.uk/mailman/listinfo/gllug<br></div> </div></body>
</html>