Zamena textu ve vice souborech
Petr Simek
petrsi
Středa Březen 17 11:43:20 CET 2004
On Mon, 16 Aug 1999, Snail Instruments wrote:
> Potreboval bych ve vice souborech (asi 50) zamenit jeden text za jiny. Neni
> na to uz neco vymysleneho? Diky.
Zkuste mutate -
G:\>mutate.exe
File mutation utility -- Version 1.0 -- (c) Copyright 1991, Hugh R. Kern
Usage:
MUTATE ifname[,ifname...] [-O=outpath] [-Icasesense]
[-S0=srcstr0 [-S1=srcstr1 [...]]]
[-D0=dststr0 [-D1=dststr1 [...]]]
Where:
ifname -- is a file specification for the files to be converted
(wildcards are allowed ie. "*.h")
casesense -- case sensitivity '+' on, '-' off (default on)
srcstr# -- a string to be replaced
# can vary from 0 - F
srcstr can be straight ASCII, or the following special cases
preceded by a '\' character:
\Xhh[hh]\ - hh is a sequence of hexadecimal binary bytes
\Ffilename\ - string should be read from file called filename
\Llong\ - long is a long integer (4 bytes)
\Iint\ - int is a short integer (2 bytes)
\Uuint\ - uint is an unsigned short integer (2 bytes)
\Hhex\ - hex is a hexadecimal integer (2 bytes)
\Ddouble\ - double is a double length floating point number
\Eexp\ - exp is a short floating point number
dststr# -- the string with which to replace srcstr#
dststr is specified using the same rules as srcstr
Example: To convert "let CONSTANT EQUAL ??" into "#define CONSTANT 1"
"MUTATE filename -s0=let -d0=#define -s1=EQUAL -s2=?? -d2=1"
Example: To convert "let CONSTANT EQUAL ?? /*" into "CONSTANT = 1 ;*"
"MUTATE filename -s0=let -s1=EQUAL -d1== -s2=?? -d2=1 -s3=/* -d3=;*"
> J. Hanzal
Melo by to byt k nalezeni na simtel-u .
*------------------------------------------------------------------------*
| Petr Simek APS JU |
| petrsi@jcu.cz |
*------------------------------------------------------------------------*
Další informace o konferenci Hw-list