I am writing my first shell script. In my script I would like to check if a certain command exists, and if not, install the executable. How would I check if this command exists?

if # Check that foobar command doesnt exist
then
    # Now install foobar
fi

8 Answers
8

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *