Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-22 Thread Jim Meyering
Paul Eggert [EMAIL PROTECTED] wrote: Jim Meyering [EMAIL PROTECTED] writes: I'm beginning to think GNU dd should at least warn about the portability problem. Well, the POSIX spec is pretty clear, and the POSIX tradition is that option order normally should not matter. But here we're

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Jim Meyering
Olivier Delhomme [EMAIL PROTECTED] wrote: Le Wed, 20 Dec 2006 07:52:20 +0800, Dan Jacobson disait : On both the dd man and Info pages, we see count=BLOCKS copy only BLOCKS input blocks OK, but one must use ones brain, heavens forbid, to figure out that e.g., these

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Jim Meyering
Olivier Delhomme [EMAIL PROTECTED] wrote: Here is a patch that may change this. One more small change: http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=2d4cd377583 (dd invocation): Add to the description of cbs. diff --git a/doc/coreutils.texi b/doc/coreutils.texi index

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Andreas Schwab
Jim Meyering [EMAIL PROTECTED] writes: @item [EMAIL PROTECTED] @opindex bs @cindex block size -Both read and write @var{bytes} bytes at a time. This overrides [EMAIL PROTECTED] and @samp{obs}. +Set both input and output block sizes to @var{bytes}. +This makes @command{dd} read and

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Jim Meyering
Andreas Schwab [EMAIL PROTECTED] wrote: Jim Meyering [EMAIL PROTECTED] writes: @item [EMAIL PROTECTED] @opindex bs @cindex block size -Both read and write @var{bytes} bytes at a time. This overrides [EMAIL PROTECTED] and @samp{obs}. +Set both input and output block sizes to

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Paul Eggert
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

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Jim Meyering
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

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Matthew Woehlke
Jim Meyering wrote: 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?

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Jim Meyering
Matthew Woehlke [EMAIL PROTECTED] wrote: Jim Meyering wrote: 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

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Paul Eggert
Jim Meyering [EMAIL PROTECTED] writes: I'm beginning to think GNU dd should at least warn about the portability problem. Well, the POSIX spec is pretty clear, and the POSIX tradition is that option order normally should not matter. Note also that BSD dd rejects usages like dd ibs=10 bs=3

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Matthew Woehlke
Jim Meyering wrote: Matthew Woehlke [EMAIL PROTECTED] wrote: Jim Meyering wrote: 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

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-21 Thread Paul Eggert
Matthew Woehlke [EMAIL PROTECTED] writes: IRIS/IRIX 6.5 Alpha/OSF 4.0F, 4.0G, 5.1 SPARC/Solaris 5.6 - 5.10 x86/Solaris 5.10 PA-RISC/HP-UX 11.00, 11.11 IA64/HP-UX 11.22 PPC/AIX 5.3 Thanks for checking all those. It looks like my guess was right and all SVR4-derived hosts silently

Re: [PATCH] Re: dd blocks/bytes at a time

2006-12-20 Thread Dan Jacobson
OD Here is a patch that may change this. Looks good. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

[PATCH] Re: dd blocks/bytes at a time

2006-12-20 Thread Olivier Delhomme
Le Wed, 20 Dec 2006 07:52:20 +0800, Dan Jacobson disait : On both the dd man and Info pages, we see count=BLOCKS copy only BLOCKS input blocks OK, but one must use ones brain, heavens forbid, to figure out that e.g., these bs=BYTES force