home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
newstrg.zip
/
SR.DOC
next >
Wrap
Text File
|
1996-04-04
|
2KB
|
49 lines
STRING REPLACE v2.0
American Computer Resources
28778 Bridge Water Lane
Menifee, Ca 92584 - Contact: Paul D. Polena CSID:72460,0072
STRING REPLACE reads the input file(s), searches for the target
string and replaces it with the specified string. The strings may
include embedded blanks if delimited by double quotes. Hex values
may also be used. The file specification may include DOS "wildcard"
characters such as "*" and "?". Multiple filespecs may be entered
on the command line.
STRING REPLACE uses temporary files for a measure of safety. AFTER
successful completion of string replacement for a given file the
original input file is deleted and the temporary file containing the
string replacements is renamed to that of the original input file.
A <CTRL><BREAK> key sequence discontinues processing of the current
input file leaving it un-modified.
WARNING: Exercise great caution (and basically know what you're doing)
when modifying binary files. They are VERY sensitive to
file length and internal changes.
<< PRESS ANY KEY FOR USAGE >>
USAGE: SR <old string> <new string> <filespec(s)>
DELETING STRINGS: To delete a target string use the CTL-D key sequence as
a replacement string.
Example: Delete all occurrences of the words "file header" in files MYDATA.TXT and YOURDATA.TXT
SR "file header" ^D mydata.txt yourdata.txt
USING HEX VALUES:
Example 1: Replace all the tabs in files with the extension "TXT" with 3 spaces.
SR \x09 \x20\x20\x20 *.TXT
(OR)
SR \x09 " " *.TXT
Example 2: Change all occurrences of the string "\x09" to the string "TAB".
SR \\x09 TAB <filespec(s)>
Notice that the double backslash allows referencing a "\" string as a literal.