home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
ping-w4.zip
/
sample.cmd
< prev
Wrap
OS/2 REXX Batch file
|
1997-03-01
|
989b
|
35 lines
/* -------------------------------------------------------- */
if RxFuncQuery("SysLoadFuncs") then do
rc = RxFuncAdd('SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs')
rc = SysLoadFuncs()
end
/* -------------------------------------------------------- */
ping.exe = 'ping.exe' /* Program executable name */
ping.num = '1' /* Number of times to ping */
host.1 = 'hobbes.nmsu.edu'
host.2 = 'ftp-os2.cdrom.com'
host.3 = 'www.os2ss.com'
/* host.4 = 'myfriend.static.ip.com' */
/* -------------------------------------------------------- */
parse value SysTextScreenSize() with trow tcol
parse value SysCurPos() with row col
i=1
do while host.i <> 'HOST.'i
call charout, left('Pinging' host.i'...',tcol-1)
rc=SysCurPos(row,0)
'@'ping.exe '-h -q -c 'ping.num host.i
if rc < 100 then found.i = 1
i=i+1
end
i=1
do while host.i <> 'HOST.'i
if found.i <> 'FOUND.'i then say left('Currently connected:' host.i,tcol-1)
i=i+1
end