Here's another script, based on the one by Cory, which should be faster
on systems with a large number of remote sessions. I don't sort based
on ip address, so this script could be run in break mode, etc.
FWIW,
Jeff
------cut here---------
PARM entry=main
# script to list all remote session's ip address via listfile,8.
Assumes that
# all remote sessions run the CI vs. an alternate program via the NEWCI
command.
#
if '!entry' = 'main' then
setvar ipcnt 0
errclear
continue
listfile ci.pub.sys,8 >iplist
if hpcierr <> 0 then
print iplist
escape !hpcierr
endif
xeq !hpfile entry=read_listf <iplist
deletevar cntr,ipcnt
return
elseif '!entry' = 'read_listf' then
# read listfile,8 output
setvar cntr finfo('iplist',"eof")
while setvar(cntr,cntr-1) >= 0 do
input rec <iplist
if pos("REM : ",rec) > 0 then
echo ![lft(rec,pos("P:",rec)-1)] ![word(rec,,-1)]
setvar ipcnt ipcnt+1
endif
endwhile
echo
echo !ipcnt remote sessions displayed
echo
return
endif
---------------end cut-------------
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|