=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sed/sed.1,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- src/usr.bin/sed/sed.1 2014/10/22 23:23:22 1.44 +++ src/usr.bin/sed/sed.1 2015/07/17 20:38:57 1.45 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sed.1,v 1.44 2014/10/22 23:23:22 schwarze Exp $ +.\" $OpenBSD: sed.1,v 1.45 2015/07/17 20:38:57 jasper Exp $ .\" .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" from: @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" -.Dd $Mdocdate: October 22 2014 $ +.Dd $Mdocdate: July 17 2015 $ .Dt SED 1 .Os .Sh NAME @@ -47,6 +47,7 @@ .Op Fl aEnru .Op Fl e Ar command .Op Fl f Ar command_file +.Op Fl i Ns Op Ar extension .Op Ar .Sh DESCRIPTION The @@ -94,6 +95,16 @@ .Ar command_file to the list of commands. The editing commands should each be listed on a separate line. +.It Fl i Ar extension +Edit files in-place, saving backups with the specified +.Ar extension . +If a zero-length +.Ar extension +is given, no backup will be saved. +It is not recommended to give a zero-length +.Ar extension +when in-place editing files, as you risk corruption or partial content +in situations where disk space is exhausted, etc. .It Fl r An alias for .Fl E , @@ -510,6 +521,12 @@ squeezing excess empty lines from standard input: .Bd -literal -offset indent $ sed -n ' +.Pp +The +.Fl i +option is a non-standard +.Fx +extension and may not be available on other operating systems. # Write non-empty lines. /./ { p @@ -543,7 +560,7 @@ specification. .Pp The flags -.Op Fl aEru +.Op Fl aEiru are extensions to that specification. .Pp The use of newlines to separate multiple commands on the command line