* Barak A. Pearlmutter <ba...@pearlmutter.net>, 2015-08-15, 23:10:
Fair enough. I suppose something like this would do?

if type -P mktemp > /dev/null; then ...; else ...; fi

"type" is not guaranteed to be provided by /bin/sh (see bug #747320).

And more practically, "type -P" is a bashism. It doesn't work in dash:

$ type -P mktemp
-P: not found
mktemp is /bin/mktemp

$ echo $?
127

--
Jakub Wilk

Reply via email to