version 1.44, 2014/10/22 23:23:22 |
version 1.45, 2015/07/17 20:38:57 |
|
|
.Op Fl aEnru |
.Op Fl aEnru |
.Op Fl e Ar command |
.Op Fl e Ar command |
.Op Fl f Ar command_file |
.Op Fl f Ar command_file |
|
.Op Fl i Ns Op Ar extension |
.Op Ar |
.Op Ar |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
The |
The |
|
|
.Ar command_file |
.Ar command_file |
to the list of commands. |
to the list of commands. |
The editing commands should each be listed on a separate line. |
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 |
.It Fl r |
An alias for |
An alias for |
.Fl E , |
.Fl E , |
|
|
squeezing excess empty lines from standard input: |
squeezing excess empty lines from standard input: |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
$ sed -n ' |
$ 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. |
# Write non-empty lines. |
/./ { |
/./ { |
p |
p |
|
|
specification. |
specification. |
.Pp |
.Pp |
The flags |
The flags |
.Op Fl aEru |
.Op Fl aEiru |
are extensions to that specification. |
are extensions to that specification. |
.Pp |
.Pp |
The use of newlines to separate multiple commands on the command line |
The use of newlines to separate multiple commands on the command line |