File: whereisit

package info (click to toggle)
tex-guy 1.2.4-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,676 kB
  • ctags: 2,778
  • sloc: ansic: 26,147; sh: 8,358; makefile: 663; awk: 78; perl: 63
file content (14 lines) | stat: -rwxr-xr-x 181 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /bin/sh

IFS="${IFS= 	}";
old_ifs="$IFS"; 
IFS="${IFS}:"

for dir in $PATH; do
  test -z "$dir" && dir=.
  if test -x $dir/$1; then
    echo $dir/$1
    exit 0;
  fi
done
exit 1