Name
replace
Synopsis
replaceoptions
filename
This program searches and replaces text in a simple text file,
such as a dump file. Give the text to be replaced followed by the
replacement text. Multiple pairs of such text can be given in a
space-separated list. A double-dash (--
) is used to
mark the end of text replacement pairs, after which you list the names
of files on which to perform the replacement in a space-separated
list.
The only options available for this utility are for help
(-?
or -I
), silent mode
(-s
), the version number (-v
), and
verbosity (-V
). You can also specify
-#
followed by a space and flags for debugging. See
the explanation of --debug
under
mysqldump
earlier in this chapter for options that
may be given with this flag.
The strings for which the utility is to search may include a few
regular expression parameters: \^
to indicate the
start of a line; \$
for the end of a line; and
\b
for a space.
Get MySQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.