| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: sed.1,v 1.38 2014/06/18 14:26:15 uwe Exp $ | | 1 | .\" $NetBSD: sed.1,v 1.39 2014/06/18 14:47:02 uwe Exp $ |
2 | .\" Copyright (c) 1992, 1993 | | 2 | .\" Copyright (c) 1992, 1993 |
3 | .\" The Regents of the University of California. All rights reserved. | | 3 | .\" The Regents of the University of California. All rights reserved. |
4 | .\" | | 4 | .\" |
5 | .\" This code is derived from software contributed to Berkeley by | | 5 | .\" This code is derived from software contributed to Berkeley by |
6 | .\" the Institute of Electrical and Electronics Engineers, Inc. | | 6 | .\" the Institute of Electrical and Electronics Engineers, Inc. |
7 | .\" | | 7 | .\" |
8 | .\" Redistribution and use in source and binary forms, with or without | | 8 | .\" Redistribution and use in source and binary forms, with or without |
9 | .\" modification, are permitted provided that the following conditions | | 9 | .\" modification, are permitted provided that the following conditions |
10 | .\" are met: | | 10 | .\" are met: |
11 | .\" 1. Redistributions of source code must retain the above copyright | | 11 | .\" 1. Redistributions of source code must retain the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer. | | 12 | .\" notice, this list of conditions and the following disclaimer. |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
14 | .\" notice, this list of conditions and the following disclaimer in the | | 14 | .\" notice, this list of conditions and the following disclaimer in the |
| @@ -87,53 +87,53 @@ rather than basic regular expressions (B | | | @@ -87,53 +87,53 @@ rather than basic regular expressions (B |
87 | The | | 87 | The |
88 | .Xr re_format 7 | | 88 | .Xr re_format 7 |
89 | manual page fully describes both formats. | | 89 | manual page fully describes both formats. |
90 | .It Fl e Ar command | | 90 | .It Fl e Ar command |
91 | Append the editing commands specified by the | | 91 | Append the editing commands specified by the |
92 | .Ar command | | 92 | .Ar command |
93 | argument | | 93 | argument |
94 | to the list of commands. | | 94 | to the list of commands. |
95 | .It Fl f Op Ar command_file | | 95 | .It Fl f Op Ar command_file |
96 | Append the editing commands found in the file | | 96 | Append the editing commands found in the file |
97 | .Ar command_file | | 97 | .Ar command_file |
98 | to the list of commands. | | 98 | to the list of commands. |
99 | The editing commands should each be listed on a separate line. | | 99 | The editing commands should each be listed on a separate line. |
100 | .It Fl I Op Ar extension | | 100 | .It Fl I Ns Op Ar extension |
101 | Edit files in-place, saving backups with the specified | | 101 | Edit files in-place, saving backups with the specified |
102 | .Ar extension . | | 102 | .Ar extension . |
103 | If no | | 103 | If no |
104 | .Ar extension | | 104 | .Ar extension |
105 | is given, no backup will be saved. | | 105 | is given, no backup will be saved. |
106 | It is not recommended to give a zero-length | | 106 | It is not recommended to give a zero-length |
107 | .Ar extension | | 107 | .Ar extension |
108 | when in-place editing files, as you risk corruption or partial content | | 108 | when in-place editing files, as you risk corruption or partial content |
109 | in situations where disk space is exhausted, etc. | | 109 | in situations where disk space is exhausted, etc. |
110 | .Pp | | 110 | .Pp |
111 | Note that in-place editing with | | 111 | Note that in-place editing with |
112 | .Fl I | | 112 | .Fl I |
113 | still takes place in a single continuous line address space covering | | 113 | still takes place in a single continuous line address space covering |
114 | all files, although each file preserves its individuality instead of | | 114 | all files, although each file preserves its individuality instead of |
115 | forming one output stream. | | 115 | forming one output stream. |
116 | The line counter is never reset between files, address ranges can span | | 116 | The line counter is never reset between files, address ranges can span |
117 | file boundaries, and the | | 117 | file boundaries, and the |
118 | .Dq $ | | 118 | .Dq $ |
119 | address matches only the last line of the last file. | | 119 | address matches only the last line of the last file. |
120 | (See | | 120 | (See |
121 | .Sx "Sed Addresses" . ) | | 121 | .Sx "Sed Addresses" . ) |
122 | That can lead to unexpected results in many cases of in-place editing, | | 122 | That can lead to unexpected results in many cases of in-place editing, |
123 | where using | | 123 | where using |
124 | .Fl i | | 124 | .Fl i |
125 | is desired. | | 125 | is desired. |
126 | .It Fl i Op Ar extension | | 126 | .It Fl i Ns Op Ar extension |
127 | Edit files in-place similarly to | | 127 | Edit files in-place similarly to |
128 | .Fl I , | | 128 | .Fl I , |
129 | but treat each file independently from other files. | | 129 | but treat each file independently from other files. |
130 | In particular, line numbers in each file start at 1, | | 130 | In particular, line numbers in each file start at 1, |
131 | the | | 131 | the |
132 | .Dq $ | | 132 | .Dq $ |
133 | address matches the last line of the current file, | | 133 | address matches the last line of the current file, |
134 | and address ranges are limited to the current file. | | 134 | and address ranges are limited to the current file. |
135 | (See | | 135 | (See |
136 | .Sx "Sed Addresses" . ) | | 136 | .Sx "Sed Addresses" . ) |
137 | The net result is as though each file were edited by a separate | | 137 | The net result is as though each file were edited by a separate |
138 | .Nm | | 138 | .Nm |
139 | instance. | | 139 | instance. |