mtimeout.1: Use correct dash for number ranges.
[misc] / inplace.1
CommitLineData
3770fe80 1.de VS
2.sp 1
3.RS
4.nf
5.ft B
6..
7.de VE
8.ft R
9.fi
10.RE
11.sp 1
12..
13.TH inplace 1 "5 February 2005" "Edgeware tools"
14.SH NAME
15inplace \- update a file in-place
16.SH SYNOPSIS
17.B inplace
18.I file
71d8432e 19\&...
3770fe80 20.B \-\-
21.I program
22.RI [ arguments ...]
23.SH DESCRIPTION
24The
25.B inplace
26program rewrites files in place using filters. For each
27.I file
28it runs
29.VS
30.IR "program arguments " ...
31.VE
32with standard input redirected from
33.I file
34and redirecting standard output to
35.IR file \c
36.BR .new .
841e5aca 37If all these programs are successful, then each
3770fe80 38.I file
39is copied to
40.IB file .old
41and each
42.IB file .new
43renamed to
44.IR file ;
45the
46.IB file .old
841e5aca 47files are then deleted. If something went wrong, the
3770fe80 48.IB file .new
49files are all deleted and the original
50.IR file s
51are left unmodified.
52.I program
53exits successfully,
54.B inplace
55will rename the newly-written
56.IB file .new
57to simply
58.I file
59and exit zero; otherwise it deletes
60.IB file .new
61and exits the same as
62.I program
63did.
64.SH BUGS
65Doesn't exit correctly if subprogram was killed by a signal. The update
66isn't completely perfect but it's very good; it can leave debris lying
67around if strange things happen during the renaming.
68.SH AUTHOR
71d8432e 69Mark Wooding <mdw@distorted.org.uk>