Skip to content

Commit 24ce971

Browse files
author
jmc
committed
- document that multiple commands may be newline or semicolon separated
- refer to latest posix revision - note that -a and newline-separated multiple commands are non-portable - note which commands do not permit being specified separated by semicolons based around pr 5269, from tilo stritzky much help/ok otto
1 parent 03cc241 commit 24ce971

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

usr.bin/sed/sed.1

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.\" $OpenBSD: sed.1,v 1.24 2006/10/24 11:46:53 jmc Exp $
1+
.\" $OpenBSD: sed.1,v 1.25 2006/10/26 20:19:12 jmc Exp $
22
.\"
33
.\" Copyright (c) 1992, 1993
44
.\" The Regents of the University of California. All rights reserved.
@@ -57,7 +57,9 @@ The input is then written to the standard output.
5757
.Pp
5858
A single command may be specified as the first argument to
5959
.Nm sed .
60-
Multiple commands may be specified by using the
60+
Multiple commands may be specified
61+
separated by newlines or semicolons,
62+
or by using the
6163
.Fl e
6264
or
6365
.Fl f
@@ -502,11 +504,29 @@ option on the command line.
502504
.Sh STANDARDS
503505
The
504506
.Nm
505-
function is expected to be a superset of the
506-
.St -p1003.2
507+
utility is compliant with the
508+
.St -p1003.1-2004
507509
specification.
510+
.Pp
511+
The flag
512+
.Op Fl a
513+
is an extension to the specification.
514+
.Pp
515+
The use of newlines to separate multiple commands on the command line
516+
is non-portable;
517+
the use of newlines to separate multiple commands within a command file
518+
.Pq Fl f Ar command_file
519+
is portable.
508520
.Sh HISTORY
509521
A
510522
.Nm
511523
command appeared in
512524
.At v7 .
525+
.Sh CAVEATS
526+
The use of semicolons to separate multiple commands
527+
is not permitted for the following commands:
528+
.Cm a , b , c ,
529+
.Cm i , r , t ,
530+
.Cm w , \&: ,
531+
and
532+
.Cm # .

0 commit comments

Comments
 (0)