[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dd tool: program vs. manual contradiction
From: |
Jim Meyering |
Subject: |
Re: dd tool: program vs. manual contradiction |
Date: |
Sat, 20 Dec 2003 10:41:58 +0100 |
Thank you for the report.
GNU dd has worked that way since at least 1992,
but I see nothing in the POSIX spec
http://www.opengroup.org/onlinepubs/007904975/utilities/dd.html
that suggests such a restriction is necessary,
so I've just changed the code to allow one to combine the unblock
and sync conversions.
Now, dd works like this:
$ printf 010203x | ./dd cbs=2 ibs=2 conv=unblock,sync 2>/dev/null |cat -A
01$
02$
03$
x$
At first (reading only the description of sync), I thought the last line
should be space-padded. But the description of unblock says this:
`unblock'
Replace trailing spaces in each `cbs'-sized input block with a
newline.
Volker Paul <address@hidden> wrote:
> I found what I see as a contradiction between
> the dd program error output and its manual.
>
> info dd extract:
> `sync'
> Pad every input block to size of `ibs' with trailing zero
> bytes. When used with `block' or `unblock', pad with spaces
> instead of zero bytes.
>
> I read this as: sync can be used with unblock.
> But I get the error message:
>
> echo 000100020003 | dd cbs=4 conv=sync,unblock
> dd: only one conv in {ascii,ebcdic,ibm}, {lcase,ucase}, {block,unblock},
> {unblock,sync}
>
> which I read as: unblock and sync can't be used together.
>
> What is true?
>
> (What I wanted to do is:
> Convert a file with fixed block size, here 4 bytes,
> to one with every block ended with \n:
> 0001
> 0002
> 0003
> )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: dd tool: program vs. manual contradiction,
Jim Meyering <=