diff --git a/HashProgramOutput.sh b/HashProgramOutput.sh --- a/HashProgramOutput.sh +++ b/HashProgramOutput.sh @@ -11,8 +11,12 @@ md5cmd=$(which md5) is_md5sum=0 if [ ! -x "$md5cmd" ]; then - echo "error: unable to find either 'md5sum' or 'md5'" - exit 1 + md5sum=$(which csum) + if [ ! -x "$md5cmd" ]; then + echo "error: unable to find either 'md5sum', 'md5' or 'csum'" + exit 1 + fi + md5sum="${md5cmd} -h MD5" fi fi