- Historic implementations of sed, for the above example, would
- never output the test. There was a bug, however, that if the
- "1,3" was replaced by a RE address they would output the text
- after the branch no longer applied, but would then quit without
- further processing. For example:
-
- 2,4b
- /one/,/three/c\
- text
-
- with the input:
-
- one
- two
- three
- four
- five
- six
-
- would output:
-
- two
- three
- four
- text
-
- This implementation never outputs the text, for either example.
- This is based on the belief that it would be reasonable to want
- to output some text if the pattern /one/,/three/ occurs but only
- if it occurs outside of the range of lines 2 to 4.
+ Historic implementations, and this implementation, do not output
+ the text in the above example. The general rule, therefore,
+ is that a range whose second address is never matched extends to
+ the end of the input.