GNU bug report logs - #34332
GNU sed v.4.5 – Attempt to delete rows from output of command 'parted' fails

Previous Next

Package: sed;

Reported by: Ricky Tigg <ricky.tigg <at> gmail.com>

Date: Tue, 5 Feb 2019 14:15:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34332 in the body.
You can then email your comments to 34332 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-sed <at> gnu.org:
bug#34332; Package sed. (Tue, 05 Feb 2019 14:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricky Tigg <ricky.tigg <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-sed <at> gnu.org. (Tue, 05 Feb 2019 14:15:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricky Tigg <ricky.tigg <at> gmail.com>
To: bug-sed <at> gnu.org
Subject: GNU sed v.4.5 – Attempt to delete rows from output of command 'parted' fails
Date: Tue, 5 Feb 2019 15:14:04 +0100
[Message part 1 (text/plain, inline)]
sed (GNU sed) 4.5 – Attempt to delete rows from output of command parted
fails. Command executed:

# parted /dev/sdc | sed '1,3d'

For comparison:

# parted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
[Message part 2 (text/html, inline)]

Information forwarded to bug-sed <at> gnu.org:
bug#34332; Package sed. (Tue, 05 Feb 2019 22:59:03 GMT) Full text and rfc822 format available.

Message #8 received at 34332 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Ricky Tigg <ricky.tigg <at> gmail.com>, 34332 <at> debbugs.gnu.org
Subject: Re: bug#34332: GNU sed v.4.5 – Attempt to delete rows from output of command 'parted' fails
Date: Tue, 5 Feb 2019 15:58:41 -0700
tags 34332 notabug
close 34332
stop

hello,

On 2019-02-05 7:14 a.m., Ricky Tigg wrote:
> sed (GNU sed) 4.5 – Attempt to delete rows from output of command parted
> fails. Command executed:
> 
> # parted /dev/sdc | sed '1,3d'

I don't think it failed - it worked exactly as you requested - deleting
the first three lines.

But...

> For comparison:
> 
> # parted /dev/sdc
> GNU Parted 3.2
> Using /dev/sdc
> Welcome to GNU Parted! Type 'help' to view a list of commands.
> (parted)
> 

"parted" is an interactive program, and piping its output into another
program is very likely to result in weird behavior.

In this case, the 4th line "(parted)" does not end with a newline
(because parted is interactive), and "sed" waits until a newline
is printed to process the line.

If you press "enter" several times (or type parted commands)
you'll see these commands appear on the screen, even when piped
to sed.

As such, I'm closing this as not-a-bug, but discussion can
continue by replying to this thread.

regards,
 - assaf






Added tag(s) notabug. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 05 Feb 2019 22:59:04 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 34332 <at> debbugs.gnu.org and Ricky Tigg <ricky.tigg <at> gmail.com> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 05 Feb 2019 22:59:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Mar 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 53 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.