在众多文本替换工具中,binsub号称可以查找、替换超过2000字符,前提是运用前缀@,以下是binsub的文档说明:
BINSUB 1.8 (c)1994 by Peter Enzerink. May be freely distributed.
TARGET
DOS: MSDOS 3.0 +
CPU: 386 +
INTRODUCTION
Not all that complicated, but I find I use this tool all the time!
Basically it will let you search any type of file for any type of string,
up to about two thousand characters in length, and replace it with another
string of variable length up to 4096 characters.
Since DOS does not allow a command line to have more than 127 characters,
you may prefix the old or new pattern with an '@'. This will tell BINSUB
to look for a file called {oldpattern} and use its contents as the search
string. Likewise with the new pattern.
You can search for binary patterns and nonprinting characters by specifying
each character with a special format:
/nnn where nnn is a three digit decimal number representing the ASCII
value of the character.
An example use:
BINSUB CONFIG.SYS fcbs=4,1/013/010 fcbs=1,0/013/010lastdrive=z/013/010
This will modify the fcbs parameter in the file, and also insert a lastdrive
statement between the fcbs line and the next line in the file.
If the search or replace string has spaces in it, you can surround the
text with quotes, or use /032 for spaces. (Quotes would be faster)
You cannot include a simple '/' in your search or replace text, since the
program will assume you are attempting a substitution! You should use
/047 whenever you wish to search or replace a '/'.
COMMAND LINE OPTIONS
You may add a /I to the end of the command line to make the search case
insensitive. This is particularly useful in text files.
可是,我怎么试也不会成功,可能是我不会binsub的替换语法。
现附上binsub程序,让大家看看。