//View Tip #204
Similar Tips
» Command Line Russian Roulette

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Sometimes you want to find a program without knowing the full name. This can be done with the following one liner:

IFS=: ; for D in $PATH; do for F in $D/*PATTERN*; do [ -x $F ] && echo $F; done; done

For example:
$ IFS=: ; for D in $PATH; do for F in $D/*text*; do [ -x $F ] && echo $F; done; done
/usr/bin/gettext
/usr/bin/glib-gettextize
/usr/bin/gnome-text-editor
/usr/bin/xgettext


View Comments »




Comments 

Add your comment

Comments are currently disabled
No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit