1REPLACE(1) MariaDB Database System REPLACE(1)
2
3
4
6 replace - a string-replacement utility
7
9 replace arguments
10
12 The replace utility program changes strings in place in files or on the
13 standard input.
14
15 Invoke replace in one of the following ways:
16
17 shell> replace from to [from to] ... -- file_name [file_name] ...
18 shell> replace from to [from to] ... < file_name
19
20 from represents a string to look for and to represents its replacement.
21 There can be one or more pairs of strings.
22
23 Use the -- option to indicate where the string-replacement list ends
24 and the file names begin. In this case, any file named on the command
25 line is modified in place, so you may want to make a copy of the
26 original before converting it. replace prints a message indicating
27 which of the input files it actually modifies.
28
29 If the -- option is not given, replace reads the standard input and
30 writes to the standard output.
31
32 replace uses a finite state machine to match longer strings first. It
33 can be used to swap strings. For example, the following command swaps a
34 and b in the given files, file1 and file2:
35
36 shell> replace a b b a -- file1 file2 ...
37
38 The replace program is used by msql2mysql. See msql2mysql(1).
39
40 replace supports the following options.
41
42 · -?, -I
43
44 Display a help message and exit.
45
46 · -#debug_options
47
48 Enable debugging.
49
50 · -s
51
52 Silent mode. Print less information what the program does.
53
54 · -v
55
56 Verbose mode. Print more information about what the program does.
57
58 · -V
59
60 Display version information and exit.
61
63 Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
64 2010-2015 MariaDB Foundation
65
66 This documentation is free software; you can redistribute it and/or
67 modify it only under the terms of the GNU General Public License as
68 published by the Free Software Foundation; version 2 of the License.
69
70 This documentation is distributed in the hope that it will be useful,
71 but WITHOUT ANY WARRANTY; without even the implied warranty of
72 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
73 General Public License for more details.
74
75 You should have received a copy of the GNU General Public License along
76 with the program; if not, write to the Free Software Foundation, Inc.,
77 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see
78 http://www.gnu.org/licenses/.
79
80
82 For more information, please refer to the MariaDB Knowledge Base,
83 available online at https://mariadb.com/kb/
84
86 MariaDB Foundation (http://www.mariadb.org/).
87
88
89
90MariaDB 10.3 9 May 2017 REPLACE(1)