home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / cdipf.zip / cdipf.cmd next >
OS/2 REXX Batch file  |  1996-12-27  |  466b  |  19 lines

  1. /* REXX -- Cheap and Dirty IP Finder
  2.    Extract current dial-up IP from PPP log file
  3. */
  4.  
  5. If RxFuncQuery('SysLoadFuncs') Then Do
  6.     Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  7.     Call SysLoadFuncs
  8. End
  9.  
  10. In_File = VALUE('etc',,OS2ENVIRONMENT) || '\ppp0.log'
  11.  
  12. Do While lines(In_File) > 0
  13.    Line_In = Linein(In_File)
  14.    If Wordpos('local', Line_In) > 0 Then
  15.       Say 'The current dial-up IP is 'Word(Line_In, Words(Line_In))
  16. End
  17.  
  18. Exit
  19.