Inplace

inplace is a program which executes a filter for each of a set of files, and saves the output under the same name as the input file. It is intended to be used to perform "in-place" modifications of files. For example, to replace "foo" with "bar" in a set of C source files, you might use a command like this:

inplace -p '*.c' -- sed s/foo/bar/g

inplace will invoke sed for each source file, directing the output to a temporary file and replacing the original with the temporary file when sed terminates.

inplace executes commands directly, i.e. without going via the shell. If you want to execute complex shell commands then you must quote the shell command (more about shell quoting).

See the rjkshelltools home page for download details.

Copyright

Copyright © 2001 Richard Kettlewell.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, 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.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

RJK | Contents