From unknown Fri Jun 13 10:22:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34367: GNU sed v. 4.5 =?UTF-8?Q?=E2=80=93?= Are printed the very rows aimed not to be printed. Resent-From: Ricky Tigg Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Thu, 07 Feb 2019 11:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34367 X-GNU-PR-Package: sed X-GNU-PR-Keywords: To: 34367@debbugs.gnu.org X-Debbugs-Original-To: bug-sed@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15495376266448 (code B ref -1); Thu, 07 Feb 2019 11:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Feb 2019 11:07:06 +0000 Received: from localhost ([127.0.0.1]:36587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grhWM-0001fu-3J for submit@debbugs.gnu.org; Thu, 07 Feb 2019 06:07:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grhWK-0001fJ-Ps for submit@debbugs.gnu.org; Thu, 07 Feb 2019 06:07:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:42529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grhWF-0008BS-FL for submit@debbugs.gnu.org; Thu, 07 Feb 2019 06:06:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grhWB-0002gZ-BQ for bug-sed@gnu.org; Thu, 07 Feb 2019 06:06:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grhW9-00085H-9M for bug-sed@gnu.org; Thu, 07 Feb 2019 06:06:55 -0500 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]:38022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grhVz-0007vp-O0 for bug-sed@gnu.org; Thu, 07 Feb 2019 06:06:47 -0500 Received: by mail-ot1-x32e.google.com with SMTP id e12so17519191otl.5 for ; Thu, 07 Feb 2019 03:06:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=blhnfXiDka0MkGZbzZWAM6MXUK8ukyqJpjHXqY/6KN4=; b=f1CX2Q4Q+FyPsFALhu26U9l2l5Lcts9kYdLsrJO2QkrHmZk3YkuJVtBy69/jZ+l7bh My+ffq1B7n0iSILuPYcxHFhSWkjCtQtUFre6AvxOY9W+Xc4MU36EA1tqDRegaDMx6BfJ t3huG99IIOJqKqTN/cJaRB32Z9VO193FHBVSFhAz8HBB6LsUuCeQop0OqOQseyZmuh78 LXMUIfU/6WdI1iEYOEHL3UfI9Xq1hzrhsw3kkbihbf8WZE9EIBx0vAyrh582aPToAbBI I3whWi7VSZX4ps03GtP85auOMAVXgw40/bpFurnuNBZPXqJA6do9zeMlVQBNgf8WqxSL 8h9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=blhnfXiDka0MkGZbzZWAM6MXUK8ukyqJpjHXqY/6KN4=; b=qtA2nbTVXN3nh7Y9wMjV3i09ZhW6QOLHAbL2vduqBQD3fNqb+eeB657WD6dhsxRf91 q1WQwWQh4GIXSCNg0RPak4HHRQ8xmJdlz6he49k0B6XubgQdanZyIAyK2tn6TKkEd4l+ 8y46uW71DX83eerHYdQMeSf6ntWNTZ+ML0ypcWxaFzbewhJTuK6ce9VbsUEne3Ec7ruf w40VHRAYNjVgPUOLjp2DTA15ig6fDw90ZRbS2K6HCw+vmjFfbJ+61/loluZz71zErkli u3A8tJynF4oxADHPgccGzlq9eQg5qtPr5+VBCIOiiyIcIelDdQVP2bxgUBsvOzxfIquo dvjw== X-Gm-Message-State: AHQUAuYlEqpEEPZwp9TceFSO26wjXQPJPq3ep2E5KjVV2bszSpvJb7bv eZg3pyc4sTDWETvqYzPy+pTfeyQmCENW00eldvV9SbpcHaw= X-Google-Smtp-Source: AHgI3IabZKPQFKCuJEFat+LCYx1gNfAHoUb3rkL7PNJFfdCcgFgKMjfs3DEd23K8uje27M0pASLv6UXAsUdT1bHYV4A= X-Received: by 2002:a05:6808:493:: with SMTP id z19mr2321919oid.46.1549537597467; Thu, 07 Feb 2019 03:06:37 -0800 (PST) MIME-Version: 1.0 From: Ricky Tigg Date: Thu, 7 Feb 2019 12:06:22 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000102f0105814bd6ad" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::32e X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --000000000000102f0105814bd6ad Content-Type: text/plain; charset="UTF-8" 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 or e2fsck -b 32768 Unexpectedly there is no mention of the output resulting from the first command. Regards. --000000000000102f0105814bd6ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi. Command execute= d focusing on an USB device's whole block:

# fsck /dev/sdc | sed '1,2= d'
e2fsck 1.44.3 (10-July-2018)
e2fsck: need terminal for interac= tive repairs:

Are printed the very rows aim= ed not to be printed; then Sed behaved according to command sed '1,2!d'.

For comparison (whole output is here mentioned) :<= /div>

# = 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-b= lock while trying to open /dev/sdc

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


Unexpectedly there is no mention of t= he output resulting from the first command. Regards.
<= /div> --000000000000102f0105814bd6ad-- From unknown Fri Jun 13 10:22:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34367: GNU sed v. 4.5 =?UTF-8?Q?=E2=80=93?= Are printed the very rows aimed not to be printed. Resent-From: Assaf Gordon Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Thu, 07 Feb 2019 22:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34367 X-GNU-PR-Package: sed X-GNU-PR-Keywords: To: Ricky Tigg , 34367@debbugs.gnu.org Received: via spool by 34367-submit@debbugs.gnu.org id=B34367.154957849217255 (code B ref 34367); Thu, 07 Feb 2019 22:29:02 +0000 Received: (at 34367) by debbugs.gnu.org; 7 Feb 2019 22:28:12 +0000 Received: from localhost ([127.0.0.1]:38679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grs9T-0004U9-JX for submit@debbugs.gnu.org; Thu, 07 Feb 2019 17:28:11 -0500 Received: from mail-pg1-f172.google.com ([209.85.215.172]:39181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grs9P-0004TP-36; Thu, 07 Feb 2019 17:28:07 -0500 Received: by mail-pg1-f172.google.com with SMTP id r11so612599pgp.6; Thu, 07 Feb 2019 14:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=yIMmRTVLaCw/UewcHRGAH4s55E2W49IdrxdRFMC5yEg=; b=WvW0rncV+6TttqZBD1Zeucc5InhFTajM8IxVawDbc5OVtu9G7DQ7/D7QIUQ9ZwwhOn bslyhjXVeydedS8UOkNwK3hq+3GxyZIYktM5fZFlHDZiVse+uy7T1eQUNmnb8QDTloEm xhdV9qoj1L1xbxho/tr7WcAUtWgxwVx1GB1jZD3jvN8figNTAs/G53/a3W9of3BX1kHL 2auiggVBmvT6HqMdquOqMeTsPlVxbojM18k1tsarN3hgd7P0SxDtrsn6pDpncJ1ehRoy QCRKbTKHe60GUn+GmGfXheQ041cGGM1QwlQWAXjCViuSRRj/SOcbGPGvuR02vLzdIHnG SOxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yIMmRTVLaCw/UewcHRGAH4s55E2W49IdrxdRFMC5yEg=; b=t2gY0V6Ha90xfeWkzDBUIpowVdJlDc7Xunyj5F6zPXf9G98anWOJgdxX3xhJGyYeEF F+5eUszC9zSdpFJlnvqal2CGcyVzMUOsmJMx/2gIYtgQMqU3EoCP1Ql6+xuFlM2CgOjO L6skGNaEHpe0ohdehMH4xm32IbKXN4+ubmBPZ6BKMJRgzQqIXOXDMvvNp92KvpugAbe/ wOzkn6D+s4mT0baV0G5ZkRm8ONoXdAr6adEyunPBUKivUAilodE5bokPGxCuUFnQiu03 Z8eQb5sy3o5tj48lM6hZ8FbjTJIKwNyp5VjC/zIr1XyKi/yTzkF23eXrWBs5qMl+rcIk 9L1A== X-Gm-Message-State: AHQUAuamPYQsnoLic7mR8r0fqATkR+FI7ye4Spu0yPH2yk2ydcX0DCf4 YZ+AdUbYX71RWbFpcUutPQToHx6X X-Google-Smtp-Source: AHgI3IZ8JGH8XLVUqdh4teybD1UVXNA6GQNGc/R8ntqNImc9010HocAuYa0r43oSvyf/kroEOALbdQ== X-Received: by 2002:a63:cf4b:: with SMTP id b11mr17358222pgj.405.1549578480741; Thu, 07 Feb 2019 14:28:00 -0800 (PST) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id f14sm152151pgv.23.2019.02.07.14.27.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Feb 2019 14:27:59 -0800 (PST) References: From: Assaf Gordon Message-ID: Date: Thu, 7 Feb 2019 15:27:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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