On 07/06/2012 09:18 AM, Peng Yu wrote:
> Hi,
> 
> I don't see any difference between the two md5sum commands (on Mac OS).
> 
> ~/linux/test/gnu/gnu/coreutils/md5sum/--binary$ ./main.sh
> md5sum `which md5sum`
> which md5sum
> 02389bdcb510f7a2667f94c4264bebd8  /opt/local/libexec/gnubin/md5sum
> md5sum -b `which md5sum`
> which md5sum
> 02389bdcb510f7a2667f94c4264bebd8 */opt/local/libexec/gnubin/md5sum
> 
> ~/linux/test/gnu/gnu/coreutils/md5sum/--binary$ cat main.sh
> #!/usr/bin/env bash
> 
> set -v
> md5sum `which md5sum`
> md5sum -b `which md5sum`
> 
> As mentioned at http://cygwin.com/cygwin-ug-net/using-textbinary.html,
> the difference between --binary and default is only important on
> windows, right?

It only matters on non-posix systems where fopen(name,"rb") behaves
differently from fopen(name,"r").  Windows is the most popular of these
systems; and you are correct that Mac OS is not impacted.

-- 
Eric Blake   [email protected]    +1-919-301-3266
Libvirt virtualization library http://libvirt.org



Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to