David Madore <david.mad...@ens.fr> wrote:
> Package: coreutils
> Version: 6.10-6
> Severity: wishlist
>
> dd is typically the sort of program where one would like to enter
> numbers (for bs, count, skip and seek) in hex (or possibly octal)
> format.  Unfortunately, dd won't parse them:
>
> pleiades david ~ $ dd if=/dev/zero bs=0x1000 count=1
> dd: invalid number `0x1000'
>
> Could you parse numbers as per scanf("%i",...) or strtoll(...,0)?

Hi David,

Since the shell already has a mechanism to do that,
(all POSIX-conforming ones do)

    $ echo $((0x1000))
    4096

How about letting *it* do the work:

    dd if=/dev/zero bs=$((0x1000)) count=1

That's portable and works right away.
No need to wait for -- or rely on -- a patched/newer version of dd.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to