I'm using Bash on OS X. There are several commands that I want to determine if exist, but don't want to run them in case they do exist and have unwanted effects. For example, if I wanted to test if destroyPC
were a command, but didn't want to test it by running it. Is there a simple way to do this, like isCommand destroyPC
?
EDIT: This is already answered here. I was looking for "does this COMMAND exist" without thinking to look for "does this PROGRAM exist". Remember that commands are just programs.