[Vm-dev] conditionally define a function in sh/bash?

Eliot Miranda eliot.miranda at gmail.com
Fri Jun 20 00:17:14 UTC 2014


Hi All,

    I'm trying

if [ "$OS" = Darwin ]; then
    function quietmd5 () { /sbin/md5 -q "$1"; }
else
    function quietmd5 () { /usr/bin/md5sum "$1"| sed 's/ .*$//'; }
fi

but bash no like :-(
-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140619/1eee33e6/attachment.htm


More information about the Vm-dev mailing list