Deleted Added
full compact
POSIX (1591) POSIX (168386)
1# @(#)POSIX 8.1 (Berkeley) 6/6/93
1# @(#)POSIX 8.1 (Berkeley) 6/6/93
2# $FreeBSD: head/usr.bin/sed/POSIX 168386 2007-04-05 13:31:17Z yar $
2
3Comments on the IEEE P1003.2 Draft 12
4 Part 2: Shell and Utilities
5 Section 4.55: sed - Stream editor
6
7Diomidis Spinellis <dds@doc.ic.ac.uk>
8Keith Bostic <bostic@cs.berkeley.edu>
9

--- 102 unchanged lines hidden (view full) ---

112 'c' command is triggered at the third line, i.e. will the text
113 be output even though line 3 of the input will never logically
114 encounter that command.
115
116 2,4b
117 1,3c\
118 text
119
3
4Comments on the IEEE P1003.2 Draft 12
5 Part 2: Shell and Utilities
6 Section 4.55: sed - Stream editor
7
8Diomidis Spinellis <dds@doc.ic.ac.uk>
9Keith Bostic <bostic@cs.berkeley.edu>
10

--- 102 unchanged lines hidden (view full) ---

113 'c' command is triggered at the third line, i.e. will the text
114 be output even though line 3 of the input will never logically
115 encounter that command.
116
117 2,4b
118 1,3c\
119 text
120
120 Historic implementations, and this implementation, do not output
121 the text in the above example. The general rule, therefore,
122 is that a range whose second address is never matched extends to
123 the end of the input.
121 Historic implementations did not output the text in the above
122 example. Therefore it was believed that a range whose second
123 address was never matched extended to the end of the input.
124 However, the current practice adopted by this implementation,
125 as well as by those from GNU and SUN, is as follows: The text
126 from the 'c' command still isn't output because the second address
127 isn't actually matched; but the range is reset after all. In the
128 above example, only the first line of the input will be deleted.
124
12513. Historical implementations allow an output suppressing #n at the
126 beginning of -e arguments as well as in a script file. POSIX
127 does not specify this. This implementation follows historical
128 practice.
129
13014. POSIX does not explicitly specify how sed behaves if no script is
131 specified. Since the sed Synopsis permits this form of the command,

--- 67 unchanged lines hidden ---
129
13013. Historical implementations allow an output suppressing #n at the
131 beginning of -e arguments as well as in a script file. POSIX
132 does not specify this. This implementation follows historical
133 practice.
134
13514. POSIX does not explicitly specify how sed behaves if no script is
136 specified. Since the sed Synopsis permits this form of the command,

--- 67 unchanged lines hidden ---