Wed Jun 18 14:47:02 2014 UTC ()
Suppress space after -I and -i options in description too.
XXX: This should be documented explicitly.


(uwe)
diff -r1.38 -r1.39 src/usr.bin/sed/sed.1

cvs diff -r1.38 -r1.39 src/usr.bin/sed/sed.1 (expand / switch to unified diff)

--- src/usr.bin/sed/sed.1 2014/06/18 14:26:15 1.38
+++ src/usr.bin/sed/sed.1 2014/06/18 14:47:02 1.39
@@ -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
87The 87The
88.Xr re_format 7 88.Xr re_format 7
89manual page fully describes both formats. 89manual page fully describes both formats.
90.It Fl e Ar command 90.It Fl e Ar command
91Append the editing commands specified by the 91Append the editing commands specified by the
92.Ar command 92.Ar command
93argument 93argument
94to the list of commands. 94to the list of commands.
95.It Fl f Op Ar command_file 95.It Fl f Op Ar command_file
96Append the editing commands found in the file 96Append the editing commands found in the file
97.Ar command_file 97.Ar command_file
98to the list of commands. 98to the list of commands.
99The editing commands should each be listed on a separate line. 99The 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
101Edit files in-place, saving backups with the specified 101Edit files in-place, saving backups with the specified
102.Ar extension . 102.Ar extension .
103If no 103If no
104.Ar extension 104.Ar extension
105is given, no backup will be saved. 105is given, no backup will be saved.
106It is not recommended to give a zero-length 106It is not recommended to give a zero-length
107.Ar extension 107.Ar extension
108when in-place editing files, as you risk corruption or partial content 108when in-place editing files, as you risk corruption or partial content
109in situations where disk space is exhausted, etc. 109in situations where disk space is exhausted, etc.
110.Pp 110.Pp
111Note that in-place editing with 111Note that in-place editing with
112.Fl I 112.Fl I
113still takes place in a single continuous line address space covering 113still takes place in a single continuous line address space covering
114all files, although each file preserves its individuality instead of 114all files, although each file preserves its individuality instead of
115forming one output stream. 115forming one output stream.
116The line counter is never reset between files, address ranges can span 116The line counter is never reset between files, address ranges can span
117file boundaries, and the 117file boundaries, and the
118.Dq $ 118.Dq $
119address matches only the last line of the last file. 119address matches only the last line of the last file.
120(See 120(See
121.Sx "Sed Addresses" . ) 121.Sx "Sed Addresses" . )
122That can lead to unexpected results in many cases of in-place editing, 122That can lead to unexpected results in many cases of in-place editing,
123where using 123where using
124.Fl i 124.Fl i
125is desired. 125is desired.
126.It Fl i Op Ar extension 126.It Fl i Ns Op Ar extension
127Edit files in-place similarly to 127Edit files in-place similarly to
128.Fl I , 128.Fl I ,
129but treat each file independently from other files. 129but treat each file independently from other files.
130In particular, line numbers in each file start at 1, 130In particular, line numbers in each file start at 1,
131the 131the
132.Dq $ 132.Dq $
133address matches the last line of the current file, 133address matches the last line of the current file,
134and address ranges are limited to the current file. 134and address ranges are limited to the current file.
135(See 135(See
136.Sx "Sed Addresses" . ) 136.Sx "Sed Addresses" . )
137The net result is as though each file were edited by a separate 137The net result is as though each file were edited by a separate
138.Nm 138.Nm
139instance. 139instance.