pro whosthere ;created on 10Sep01 by C. See. ;This program looks to see which computers are on the network. ;It does this by pinging each machine listed in the file: ~/iplist.txt ;count lines in IP list file.... close,1 openr,1,'~/iplist.txt' n=0 line='' while not eof(1) do begin readf,1,line ;the first line is the header n=n+1 endwhile ;read in the list of macnines... name=strarr(n-1) ;The DNS name for each machine ip=strarr(n-1) ;The IP number for each machine close,1 openr,1,'~/iplist.txt' line='' readf,1,line ;the first line is the header for i=0,n-2 do begin readf,1,Line name(i)=strmid(line,0,14) ip(i)=strmid(line,15,16) endfor for i=0,n-2 do begin spawn,'/etc/ping '+ip(i),result stop end