| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: sed.1,v 1.26 2008/09/16 13:32:04 perry Exp $ | | 1 | .\" $NetBSD: sed.1,v 1.27 2008/09/21 16:46:01 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1992, 1993 | | 3 | .\" Copyright (c) 1992, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | | 4 | .\" The Regents of the University of California. All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to Berkeley by | | 6 | .\" This code is derived from software contributed to Berkeley by |
7 | .\" the Institute of Electrical and Electronics Engineers, Inc. | | 7 | .\" the Institute of Electrical and Electronics Engineers, Inc. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -22,27 +22,27 @@ | | | @@ -22,27 +22,27 @@ |
22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
31 | .\" SUCH DAMAGE. | | 31 | .\" SUCH DAMAGE. |
32 | .\" | | 32 | .\" |
33 | .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 | | 33 | .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 |
34 | .\" | | 34 | .\" |
35 | .Dd September 16, 2008 | | 35 | .Dd September 21, 2008 |
36 | .Dt SED 1 | | 36 | .Dt SED 1 |
37 | .Os | | 37 | .Os |
38 | .Sh NAME | | 38 | .Sh NAME |
39 | .Nm sed | | 39 | .Nm sed |
40 | .Nd stream editor | | 40 | .Nd stream editor |
41 | .Sh SYNOPSIS | | 41 | .Sh SYNOPSIS |
42 | .Nm | | 42 | .Nm |
43 | .Op Fl aEnr | | 43 | .Op Fl aEnr |
44 | .Ar command | | 44 | .Ar command |
45 | .Op Ar file ... | | 45 | .Op Ar file ... |
46 | .Nm | | 46 | .Nm |
47 | .Op Fl aEnr | | 47 | .Op Fl aEnr |
48 | .Op Fl e Ar command | | 48 | .Op Fl e Ar command |
| @@ -72,46 +72,46 @@ The files listed as parameters for the | | | @@ -72,46 +72,46 @@ The files listed as parameters for the |
72 | .Dq w | | 72 | .Dq w |
73 | functions are created (or truncated) before any processing begins, | | 73 | functions are created (or truncated) before any processing begins, |
74 | by default. | | 74 | by default. |
75 | The | | 75 | The |
76 | .Fl a | | 76 | .Fl a |
77 | option causes | | 77 | option causes |
78 | .Nm | | 78 | .Nm |
79 | to delay opening each file until a command containing the related | | 79 | to delay opening each file until a command containing the related |
80 | .Dq w | | 80 | .Dq w |
81 | function is applied to a line of input. | | 81 | function is applied to a line of input. |
82 | .It Fl E | | 82 | .It Fl E |
83 | Enables the use of extended regular expressions instead of the | | 83 | Enables the use of extended regular expressions instead of the |
84 | usual basic regular expression syntax. | | 84 | usual basic regular expression syntax. |
85 | .It Fl r | | | |
86 | Identical to | | | |
87 | .Fl E , | | | |
88 | present for compatibility with Gnu sed. | | | |
89 | .It Fl e Ar command | | 85 | .It Fl e Ar command |
90 | Append the editing commands specified by the | | 86 | Append the editing commands specified by the |
91 | .Ar command | | 87 | .Ar command |
92 | argument | | 88 | argument |
93 | to the list of commands. | | 89 | to the list of commands. |
94 | .It Fl f Ar command_file | | 90 | .It Fl f Ar command_file |
95 | Append the editing commands found in the file | | 91 | Append the editing commands found in the file |
96 | .Ar command_file | | 92 | .Ar command_file |
97 | to the list of commands. | | 93 | to the list of commands. |
98 | The editing commands should each be listed on a separate line. | | 94 | The editing commands should each be listed on a separate line. |
99 | .It Fl n | | 95 | .It Fl n |
100 | By default, each line of input is echoed to the standard output after | | 96 | By default, each line of input is echoed to the standard output after |
101 | all of the commands have been applied to it. | | 97 | all of the commands have been applied to it. |
102 | The | | 98 | The |
103 | .Fl n | | 99 | .Fl n |
104 | option suppresses this behavior. | | 100 | option suppresses this behavior. |
| | | 101 | .It Fl r |
| | | 102 | Identical to |
| | | 103 | .Fl E , |
| | | 104 | present for compatibility with GNU sed. |
105 | .El | | 105 | .El |
106 | .Pp | | 106 | .Pp |
107 | The form of a | | 107 | The form of a |
108 | .Nm | | 108 | .Nm |
109 | command is as follows: | | 109 | command is as follows: |
110 | .sp | | 110 | .sp |
111 | .Dl [address[,address]]function[arguments] | | 111 | .Dl [address[,address]]function[arguments] |
112 | .sp | | 112 | .sp |
113 | Whitespace may be inserted before the first address and the function | | 113 | Whitespace may be inserted before the first address and the function |
114 | portions of the command. | | 114 | portions of the command. |
115 | .Pp | | 115 | .Pp |
116 | Normally, | | 116 | Normally, |
117 | .Nm | | 117 | .Nm |