Skip to content

Instantly share code, notes, and snippets.

@sionide21
Created April 10, 2010 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sionide21/362318 to your computer and use it in GitHub Desktop.
Save sionide21/362318 to your computer and use it in GitHub Desktop.
Finds an executable by wildcard
function find_command
{
i=1;
while [ $(echo $PATH | cut -d : -f "$i") ]; do
PATHITEM=$(echo $PATH | cut -d : -f "$i")
find $PATHITEM -name "$1"
let i="$i+1"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment