home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / newstrg.zip / SR.DOC next >
Text File  |  1996-04-04  |  2KB  |  49 lines

  1.  
  2. STRING REPLACE v2.0
  3. American Computer Resources
  4. 28778 Bridge Water Lane
  5. Menifee, Ca 92584 - Contact: Paul D. Polena    CSID:72460,0072
  6.  
  7. STRING REPLACE reads the input file(s), searches for the target
  8. string and replaces it with the specified string.  The strings may
  9. include embedded blanks if delimited by double quotes.  Hex values
  10. may also be used. The file specification may include DOS "wildcard"
  11. characters such as "*" and "?".  Multiple filespecs may be entered
  12. on the command line.
  13.  
  14. STRING REPLACE uses temporary files for a measure of safety.  AFTER
  15. successful completion of string replacement for a given file the
  16. original input file is deleted and the temporary file containing the
  17. string replacements is renamed to that of the original input file.
  18.  
  19. A <CTRL><BREAK> key sequence discontinues processing of the current
  20. input file leaving it un-modified.
  21.  
  22. WARNING: Exercise great caution (and basically know what you're doing)
  23.          when modifying binary files.  They are VERY sensitive to
  24.          file length and internal changes.
  25.  
  26.                         << PRESS ANY KEY FOR USAGE >>
  27.  
  28. USAGE: SR <old string> <new string> <filespec(s)>
  29.  
  30. DELETING STRINGS: To delete a target string use the CTL-D key sequence as
  31.                   a replacement string.
  32.  
  33.      Example: Delete all occurrences of the words "file header" in files                      MYDATA.TXT and YOURDATA.TXT
  34.  
  35.                  SR "file header" ^D mydata.txt yourdata.txt
  36.  
  37. USING HEX VALUES:
  38.  
  39.    Example 1: Replace all the tabs in files with the extension "TXT" with                     3 spaces.
  40.  
  41.                  SR \x09 \x20\x20\x20 *.TXT
  42.                               (OR)
  43.                  SR \x09 "   " *.TXT
  44.  
  45.    Example 2: Change all occurrences of the string "\x09" to the string "TAB".
  46.                  SR \\x09 TAB <filespec(s)>
  47.  
  48.  Notice that the double backslash allows referencing a "\" string as a literal.
  49.