fix wording on #12, description of 'c' command with unmatched second
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 29 Aug 1992 06:35:20 +0000 (22:35 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 29 Aug 1992 06:35:20 +0000 (22:35 -0800)
address; from Doug McIlroy

SCCS-vsn: usr.bin/sed/POSIX 5.8

usr/src/usr.bin/sed/POSIX

index 44fc56f..341d137 100644 (file)
@@ -1,4 +1,4 @@
-#      @(#)POSIX       5.7 (Berkeley) %G%
+#      @(#)POSIX       5.8 (Berkeley) %G%
 
 Comments on the IEEE P1003.2 Draft 12
      Part 2: Shell and Utilities
 
 Comments on the IEEE P1003.2 Draft 12
      Part 2: Shell and Utilities
@@ -104,43 +104,17 @@ All uses of "POSIX" refer to section 4.55, Draft 12 of POSIX 1003.2.
        reset if a command is not executed due to a jump.  The following
        program will behave in different ways depending on whether the
        'c' command is triggered at the third line, i.e. will the text
        reset if a command is not executed due to a jump.  The following
        program will behave in different ways depending on whether the
        'c' command is triggered at the third line, i.e. will the text
-       be output even though that command is never logically encountered
-       in the script by line 3.
+       be output even though line 3 of the input will never logically
+       encounter that command.
 
        2,4b
        1,3c\
                text
 
 
        2,4b
        1,3c\
                text
 
-       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.
 
 13.    Historical implementations allow an output suppressing #n at the
        beginning of -e arguments as well as in a script file.  POSIX
 
 13.    Historical implementations allow an output suppressing #n at the
        beginning of -e arguments as well as in a script file.  POSIX