home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Collection - Online Library - January 1996 / CKITOS2196.ISO / diskette / gg244043.dsk / unc.dsk / RECOVER / LS30CMDS / REMSTATE.CMD < prev   
OS/2 REXX Batch file  |  1993-02-25  |  655b  |  38 lines

  1. /* Remark a config.sys statement */
  2.  
  3. parse upper arg configSys backupName remarkThis
  4.  
  5. 'copy ' configSys backupName
  6. if RC <> 0 then do
  7.  say 'Could not make a backup copy of the File'
  8.  'pause'
  9.  exit 9
  10. end
  11.  
  12. readLine = LINEIN(backupName,1,1)
  13. if readLine == '' then do
  14.  say 'Could not open File'
  15.  'pause'
  16.  exit 9
  17. end
  18.  
  19. call LINEOUT configSys, , 1
  20.  
  21. do while readLine <> ''
  22.  parse upper var readLine theFirst theSecond
  23.  
  24.  if theFirst = remarkThis then do
  25.   call LINEOUT configSys, 'REM ' || readLine
  26.  end
  27.  else do
  28.   call LINEOUT configSys, readLine
  29.  end
  30.  
  31.  readLine = LINEIN(backupName,,1)
  32. end
  33.  
  34. call LINEOUT configSys
  35.  
  36. exit 0
  37.  
  38.