GNU/Linux |
RedHat 9.0(Shrike) |
|
![]() |
replace(1) |
![]() |
replace - A
utility program that is used by msql2mysql, but that has
more general applicability as well. replace changes strings
in place in
files or on the standard input. Uses a finite state machine
to match
longer strings first. Can be used to swap strings.
replace [-?svIV] from to from to ... -- [files]
or |
replace [-?svIV] from to from to ... < fromfile > tofile
replace [-?|-I] [-s] [-v]
replace
-?|-I |
info |
|||
-s |
silent |
|||
-v |
verbose |
Special characters in from string:
\^ |
Match start of line. | ||
\$ |
Match end of line. | ||
\b |
Match space-character, start of line or end of line. For a end \b the next replace starts locking at the end space-character. A \b alone in a string matches only a space-character. |
this command
swaps a and b in the given files:
shell> replace a b b a -- file1 file2 ...
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1), mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1), msql2mysql (1), perror (1), replace (1), safe_mysqld (1), which1 (1), zap (1),
Ver 1.0, distribution 3.23.29a Michael (Monty) Widenius (monty@tcx.se), TCX Datakonsult AB (http://www.tcx.se). This software comes with no warranty. Manual page by L. (Kill-9) Pedersen (kill-9@kill-9.dk), Mercurmedia Data Model Architect / system developer (http://www.mercurmedia.com)
![]() |
replace(1) | ![]() |