I am trying to write a script that will attempt to find if a certain program is installed. Lets say that the program is called, myprog. The problem is that the program can be named in different formats such as, 'prefix-myprog', 'myprog', and 'prefix_myprog'. If I use:
which myprog
then the command line will return the correct location only if it is named EXACTLY, myprog.
Is there a way that I can locate all possible instances with a wildcard of sorts?
Thanks
which
. I figure that I can always loop through all of the possible choices, but just wondering if there is a better way. – Justin Apr 29 '12 at 19:06