-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paul GHALEB on 8/13/2007 10:33 AM: > > IOW, when one tries to skip exactly the size of the file, od acts as if > it ignored the "-j size" option.
[This mail assumes your sed obeys POSIX on this sequence: $ seq 3 > foo $ (sed -n q; cat) < foo 2 3 $ If this is not the case, replace 'sed -n q' with 'head -n1 > /dev/null'] While we're at it, od has another POSIX-compliance bug, when stdin is seekable and starts life in the middle of the file: $ seq 3 > blah $ (sed -n q; od -tx1z -j 7) <blah # good od: cannot skip past end of combined input $ (sed -n q; od -tx1z -j 5) <blah 0000005 $ # seeking 5 puts us past the end; this should have $ # errored just like -j7 Also, POSIX wasn't too clear on this point, but: $ (sed -n q; od -tx1z -j 4) <blah 0000004 $ # file started at offset 2; should this report offset 6, not 4? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGxRxF84KuGfSFAYARAk3/AKCl9e4RI+EYpKjG1igIfAsXfLVAtQCgy1YN Sww8fEBmLT7P1pfmh/L79Nc= =Wi5b -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils