Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A list of the various command line 'util' programs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A list of the various command line 'util' programs
Authored by: kholburn on Jul 23, '05 02:40:07PM
Use this globpath:


$ more `which globpath`
#!/bin/sh

# globpath
# (c) 2005 Kim Holburn <kim.holburn@nicta.com.au>
# released under the GPL v2 http://www.gnu.org/copyleft/gpl.html

# examples: globpath '*ping*'

SAVEIFS="$IFS"
IFS=":"
paths=( $PATH )
IFS="$SAVEIFS"

pings=( $(echo ${paths[@]/%/\/$1}) )

found=0
for i in ${pings[@]}; do
  if [ -e "$i" ]; then
    echo "$i"
    found=1
  fi 
done
if [ "$found" -eq 0 ]; then
  echo "nothing found"
fi


$ globpath '*util*'
/usr/bin/drutil
/usr/bin/escputil
/usr/bin/hdiutil
/usr/bin/mdutil
/usr/bin/niutil
/usr/bin/plutil
/usr/bin/smbutil
/usr/bin/textutil
/usr/bin/tiffutil
/usr/sbin/diskutil
/usr/sbin/kdb5_util
/usr/sbin/ktutil
/usr/sbin/scutil
/usr/sbin/timutil
/usr/sbin/vsdbutil
$ globpath '*set*'
/sw/bin/lprsetup.sh
/sw/bin/pathsetup.sh
/sw/bin/reset
/sw/bin/tiffset
/sw/bin/tset
/usr/bin/pmset
/usr/bin/psetfinfo
/usr/bin/reset
/usr/bin/setregion
/usr/bin/snmpset
/usr/bin/tset
/usr/sbin/cac_setup
/usr/sbin/dnssec-makekeyset
/usr/sbin/languagesetup
/usr/sbin/ntptimeset
/usr/sbin/pmap_set
/usr/sbin/setkey
/usr/sbin/ypset
/usr/X11R6/bin/setxkbmap
/usr/X11R6/bin/xset
/usr/X11R6/bin/xsetmode
/usr/X11R6/bin/xsetpointer
/usr/X11R6/bin/xsetroot
/usr/X11R6/bin/xtrapreset
$ globpath '*tool*'
/sw/bin/gimptool
/sw/bin/gimptool-1.2
/sw/sbin/kern_tool
/usr/bin/certtool
/usr/bin/glibtool
/usr/bin/glibtoolize
/usr/bin/install_name_tool
/usr/bin/javatool
/usr/bin/keytool
/usr/bin/libtool
/usr/bin/nibtool
/usr/bin/otool
/usr/bin/otool64
/usr/bin/pcsctool
/usr/bin/policytool
/usr/bin/servertool
/usr/bin/tdbtool
/usr/sbin/disktool
/Developer/Tools/agvtool
/Developer/Tools/uninstall-devtools.pl


[ Reply to This | # ]