<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'>
Hello again, <br><br>I've got a file with IPs and port numbers. I'm trying to split this file into different separate files based on the IP addresses and associate port numbers to file1, file2, file(n+1.) I'm issuing this statement, but it failed. <br><br> awk '/^*.*.*.*/{close("file"f);f++}{print $0 > "file"f}' file <br><br>/* many thanks for any suggestions */<br><br><b>111.111.111.111</b><br>22/ open<br>23/ open<br>80/ open<br>113/ closed<br>179/ open<br>443/ open<br>541/ open<br>1723/ open<br><br><b>172.16.8.2</b><br>22/ open<br>80/ open<br>135/ open<br>139/ open<br><br><b>172.16.8.12</b><br>21/ open<br>25/ open<br>80/ open<br>111/ open<br>135/ open<br><br>thanks for your time<br>ak <br><br>                                      </div></body>
</html>