3 ms·
more specifically the problem with type is it's not clear whether "An error occurred" includes the case where the command is not found. one could reasonably arg
by Hello71 5y ago
more specifically the problem with type is it's not clear whether "An error occurred" includes the case where the command is not found. one could reasonably argue that printing "command not found" is a successful run. additionally, it's only present in the XSI extension. for these reasons, command -v is usually preferred for better POSIX compatibility.