Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 112952 - sed 4.0.8 and t command
sed 4.0.8 and t command
Product: Fedora
Classification: Fedora
Component: sed (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-01-06 11:43 EST by Derrien
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 4.0.8-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-01-07 09:47:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Derrien 2004-01-06 11:43:15 EST
Description of problem:

On RH 9 with sed 4.0.5 :

echo "a
b" | sed '{:bcl;N;s/\n/ /;t bcl}'

gives : 
a b

On FC 1 with sed 4.0.8

echo "a
b" | sed '{:bcl;N;s/\n/ /;t bcl}'

gives nothing

So what ?

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Cf description

Additional info:
Comment 1 Jakub Jelinek 2004-01-06 18:00:09 EST
My understanding of
is that the latter behaviour is correct.
"If no next line of input is available, the N command verb shall branch to the end of the script and quit without
starting a new cycle or copying the pattern space to standard output."
Comment 2 Derrien 2004-01-07 07:57:36 EST
From /usr/share/doc/sed-4.0.8/BUGS :

`N' command on the last line

  Most versions of sed exit without printing anything when the `N'
  command is issued on the last line of a file.  GNU sed instead
  prints pattern space before exiting unless of course the `-n'
  command switch has been specified.  More information on the reason
  behind this choice can be found in the Info manual.
Comment 3 Jakub Jelinek 2004-01-07 09:47:52 EST
Paolo Bonzini (sed maintainer) provided a patch which restores the
old N behaviour unless POSIXLY_CORRECT is set in the environment.
The patch is included in sed-4.0.8-3 in rawhide.

Note You need to log in before you can comment on or make changes to this bug.