Comment
Comment by temo4ka
If you don't care for maximum POSIX compatibility, i.e. your script is bash-specific, it's better to use "hash", which is going to ignore aliases (but not functions) and also has the benefit of caching the command for further use.
more info:
https://stackoverflow.com/questions/592620/how-to-check-if-a...