bug-sed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34332: GNU sed v.4.5 – Attempt to delete rows from output of command


From: Assaf Gordon
Subject: 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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]