вс, 16 февр. 2020 г. в 01:55, Tim Düsterhus <t...@bastelstu.be>:

> Ilya,
>
> Am 15.02.20 um 20:38 schrieb Илья Шипицин:
> > that utility is not available by default in Fedora docker image.
>
> I believe we can rewrite that test to use the `type` builtin instead of
> `which`:
>


is it POSIX ?

I've just checked on freebsd, it's there. What about osx, aix, ... ?


>
> > $ type -p md5
> > $ type -p md5sum
> > /usr/bin/md5sum
> > $ md5=$(type -p md5 || type -p md5sum)
> > $ echo $md5
> > /usr/bin/md5sum
>
> Best regards
> Tim Düsterhus
>

Reply via email to