Re: extract hostnames



On Thu, 28 Sep 2006, tom wrote:

im looking for a script that can extract hostnames from a
list(txt,html) like this:

the-roadside.com 3 43197 1( 0)
202.218.17.12-OK
[etc...]

set hosts [list]
set fp [open path/to/the/file]
while {[gets $fp line] != -1} {
lappend hosts [lindex $line 0]
}
close $fp
puts $hosts

Michael
.



Relevant Pages