"Fossies" - the Fresh Open Source Software Archive
Member "littleutils-1.2.4/scripts/lreplace.1" (28 Mar 2021, 2368 Bytes) of package /linux/privat/littleutils-1.2.4.tar.lz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard
) with prefixed line numbers.
Alternatively you can here view
the uninterpreted source code file.
1 .TH LREPLACE 1 "2021 Jan 15" littleutils
2 .SH NAME
3 lreplace \- replace one string with another in a file using sed
4 .SH SYNOPSIS
15 .SH DESCRIPTION
16 \fBlreplace\fR performs string substitutions on text files. This is
17 accomplished using the \fBsed\fR and \fBtempname\fR utilities.
18 .SH OPTIONS
21 Set the \fBsed\fR delimiter. The default value is\~'\fI#\fR'.
24 Print help and quit.
27 Required option. This is the input string that will be replaced. It must be
28 of non-zero length.
31 Required option. This is the output string that will be substituted in place
32 of the input string. A zero-length string is allowable here.
35 Quiet output. No output commentary will be printed.
38 Verbose output. Commentary about unchanged files will be printed in addition
39 to the normal commentary about changed files.
42 Process zero-length input files. Normally \fBlreplace\fR will skip input files
43 with zero length to avoid spurious changes to lock files and such, but this
44 flag can be specified to permit such changes.
47 Permit zero-length output files. Normally \fBlreplace\fR will refuse to
48 generate zero-length output files as a means of protecting against replacement
49 strings that accidentally contain the delimiter, but this flag can be specified
50 to permit such changes.
51 .SH EXAMPLE
53 Replace all instances of "big apple" with "small pear" in fruit.txt.
54 lreplace -i 'big apple' -o 'small pear' fruit.txt
55 .SH "SEE ALSO"
56 \fBsed\fR(1), \fBtempname\fR(1)
57 .SH COPYRIGHT
58 Copyright (C) 2004-2021 by Brian Lindholm. This program is free software; you
59 can use it, redistribute it, and/or modify it under the terms of the GNU
60 General Public License as published by the Free Software Foundation; either
61 version 3, or (at your option) any later version.
63 This program is distributed in the hope that it will be useful, but WITHOUT ANY
64 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
65 PARTICULAR PURPOSE. See the GNU General Public License for more details.