2
.\" Title: \fBreplace\fR
3
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
6
.\" Manual: MySQL Database System
10
.TH "\FBREPLACE\FR" "1" "03/01/2010" "MySQL 5\&.1" "MySQL Database System"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
22
.\" string replacement: replace utility
24
replace \- a string\-replacement utility
26
.HP \w'\fBreplace\ \fR\fB\fIarguments\fR\fR\ 'u
27
\fBreplace \fR\fB\fIarguments\fR\fR
32
utility program changes strings in place in files or on the standard input\&.
36
in one of the following ways:
42
shell> \fBreplace \fR\fB\fIfrom\fR\fR\fB \fR\fB\fIto\fR\fR\fB [\fR\fB\fIfrom\fR\fR\fB \fR\fB\fIto\fR\fR\fB] \&.\&.\&. \-\- \fR\fB\fIfile_name\fR\fR\fB [\fR\fB\fIfile_name\fR\fR\fB] \&.\&.\&.\fR
43
shell> \fBreplace \fR\fB\fIfrom\fR\fR\fB \fR\fB\fIto\fR\fR\fB [\fR\fB\fIfrom\fR\fR\fB \fR\fB\fIto\fR\fR\fB] \&.\&.\&. < \fR\fB\fIfile_name\fR\fR
50
represents a string to look for and
52
represents its replacement\&. There can be one or more pairs of strings\&.
56
option to indicate where the string\-replacement list ends and the file names begin\&. In this case, any file named on the command line is modified in place, so you may want to make a copy of the original before converting it\&.
58
prints a message indicating which of the input files it actually modifies\&.
64
reads the standard input and writes to the standard output\&.
67
uses a finite state machine to match longer strings first\&. It can be used to swap strings\&. For example, the following command swaps
80
shell> \fBreplace a b b a \-\- file1 file2 \&.\&.\&.\fR
89
\fBmsql2mysql\fR\&. See
90
\fBmsql2mysql\fR(1)\&.
93
supports the following options\&.
106
Display a help message and exit\&.
117
\fB\-#\fR\fB\fIdebug_options\fR\fR
132
Silent mode\&. Print less information what the program does\&.
145
Verbose mode\&. Print more information about what the program does\&.
158
Display version information and exit\&.
163
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
165
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
167
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
169
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
172
For more information, please refer to the MySQL Reference Manual,
173
which may already be installed locally and which is also available
174
online at http://dev.mysql.com/doc/.
176
Sun Microsystems, Inc. (http://www.mysql.com/).