bug-coreutils
[Top][All Lists]
Advanced

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

bug#7362: dd strangeness


From: Pádraig Brady
Subject: bug#7362: dd strangeness
Date: Fri, 25 Feb 2011 12:19:35 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 02/02/11 13:23, Pádraig Brady wrote:
> This looks like another candidate to auto enable fullblock for.
> https://bugzilla.redhat.com/show_bug.cgi?id=614605
> I.E. oflag=direct

Attached is a proposed solution to this.
I'm worried about the last condition though
where we enable 'fullblock' when both count and bs are specified.

For example this would still work:

# Output first 2 parts
$ (echo part1; sleep 1; echo part2; sleep 1; echo discard) |
  dd count=2 obs=1 2>/dev/null
part1
part2

However this would not:

# Output first 2 parts, each being up to 4096 bytes
$ (echo part1; sleep 1; echo part2; sleep 1; echo discard) |
  dd count=2 ibs=4096 obs=1 2>/dev/null
part1
part2
discard

So how contrived is the last example,
given how brittle such a construct is?

cheers,
Pádraig.

Attachment: dd-fullblock.diff
Description: Text Data


reply via email to

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