Subject: bug#34367: GNU sed v. 4.5 – Are printed the very rows aimed not to be printed.

From: Ricky Tigg <[email-masked]>
Date: Thu, 7 Feb 2019 12:06:22 +0100

Hi. Command executed focusing on an USB device's whole block:

# 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'.

For comparison (*whole* output is here mentioned) :

# fsck /dev/sdc
fsck from util-linux 2.32.1
e2fsck 1.44.3 (10-July-2018)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdc

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

Unexpectedly there is no mention of the output resulting from the first
command. Regards.