Paul Eggert <[EMAIL PROTECTED]> wrote:
> Jim Meyering <[EMAIL PROTECTED]> writes:
>
>> Andreas Schwab <[EMAIL PROTECTED]> wrote:
>>> But only the preceding ones.
>>
>> True.  Thanks.
>
> Wait a minute -- POSIX says bs= should override all ibs= and obs=
> operands (not just preceding ones), and traditional dd conforms to
> POSIX here.  So the GNU documentation was right and the behavior
> wrong.
>
> Here's a patch.
>
> 2006-12-21  Paul Eggert  <[EMAIL PROTECTED]>
>
>       * NEWS: dd bs= operands now silently override later ibs= and obs=,
>       as POSIX requires.
>       * src/dd.c (scanargs): Implement it.
>       * tests/dd/misc (outbytes): Test it.
>       * doc/coreutils.texi (dd invocation): Specify that bs=N
>       overrides later ibs and obs, undoing part of the
>       previous change.  (The behavior was wrong.)

Whoa.  Good catch.
I see that both freebsd6 and netbsd1.6 disallow the usage in
your test case:

  netbsd$ echo x | /bin/dd bs=3 ibs=10 obs=10 conv=sync | wc -c
  dd: ibs: illegal argument combination or already set
  0

Solaris 10 does what you propose.
Can anyone check other implementations?

I'm beginning to think GNU dd should at least warn about
the portability problem.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to