GNU bug report logs -
#34367
GNU sed v. 4.5 – Are printed the very rows aimed not to be printed.
Previous Next
Reported by: Ricky Tigg <ricky.tigg <at> gmail.com>
Date: Thu, 7 Feb 2019 11:08:02 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 34367 <at> debbugs.gnu.org (full text, mbox):
tags 34367 notabug
close 34367
stop
Hello,
On 2019-02-07 4:06 a.m., Ricky Tigg wrote:
> # fsck /dev/sdc | sed '1,2d'
> e2fsck 1.44.3 (10-July-2018)
> e2fsck: need terminal for interactive repairs:
>
> Are printed the very rows aimed not to be printed; then *Sed* behaved
> according to command sed '1,2!d'.
>
"fsck" prints these lines to STDERR, which is not piped to sed,
hence they are printed.
Observe:
$ /sbin/fsck.ext3 foo > /dev/null
e2fsck 1.43.4 (31-Jan-2017)
e2fsck: need terminal for interactive repairs
versus:
$ /sbin/fsck.ext3 foo 2> /dev/null
foo: clean, 11/128 files, 38/1024 blocks
Also,
Notice "fsck" warns you that STDOUT is not a terminal
(because of piping to sed), and that would lead to
weird/unexpected output in interactive mode.
regards,
- assaf
This bug report was last modified 6 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.