[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14846: dd how to skip one byte from reading the man page
From: |
Pádraig Brady |
Subject: |
bug#14846: dd how to skip one byte from reading the man page |
Date: |
Fri, 12 Jul 2013 17:49:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 07/12/2013 12:50 AM, address@hidden wrote:
> If the user tries to figure out how to skip one byte
> just from reading the dd man page, and not info,
>
> in order to finally figure out how to do
>
> $ echo abc|dd ibs=1 skip=1
> bc
>
> it seems
> ibs=BYTES
> read up to BYTES bytes at a time (default: 512)
> should be instead
> ibs=BYTES
> reset the input block size (default: 512)
> or something...
Hmm I suppose a more direct description is more accurate.
BTW, note the skip_bytes flag which can be used to more
efficiently skip odd sizes:
$ echo abc | dd iflag=skip_bytes skip=1 status=none
bc
$ echo abc | strace -e read dd iflag=skip_bytes skip=1 status=none
read(0, "a", 1) = 1
read(0, "bc\n", 512) = 3
read(0, "", 512) = 0
bc
cheers,
Pádraig.