"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:


Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even erroneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the latest Fossies "Diffs" side-by-side code changes report for "lreplace.1": 1.2.3_vs_1.2.4.

LREPLACE

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLE
SEE ALSO
COPYRIGHT

NAME

lreplace − replace one string with another in a file using sed

SYNOPSIS

lreplace [−d delimiter] [−h(elp)] −i INSTRING −o OUTSTRING [−q(uiet)] [−v(erbose)] [−z(ero_length_input_processed)] [−Z(ero_length_output_permitted)] file...

DESCRIPTION

lreplace performs string substitutions on text files. This is accomplished using the sed and tempname utilities.

OPTIONS

−d DELIMITER

Set the sed delimiter. The default value is ’#’.

−h

Print help and quit.

−i INSTRING

Required option. This is the input string that will be replaced. It must be of non-zero length.

−o OUTSTRING

Required option. This is the output string that will be substituted in place of the input string. A zero-length string is allowable here.

−q

Quiet output. No output commentary will be printed.

−v

Verbose output. Commentary about unchanged files will be printed in addition to the normal commentary about changed files.

−z

Process zero-length input files. Normally lreplace will skip input files with zero length to avoid spurious changes to lock files and such, but this flag can be specified to permit such changes.

−Z

Permit zero-length output files. Normally lreplace will refuse to generate zero-length output files as a means of protecting against replacement strings that accidentally contain the delimiter, but this flag can be specified to permit such changes.

EXAMPLE

Replace all instances of "big apple" with "small pear" in fruit.txt.

lreplace -i ’big apple’ -o ’small pear’ fruit.txt

SEE ALSO

sed(1), tempname(1)

COPYRIGHT

Copyright (C) 2004-2021 by Brian Lindholm. This program is free software; you can use it, redistribute it, and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This program 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.