File: X-whereisit

package info (click to toggle)
vflib3 3.6.14.dfsg-3+nmu4
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 11,936 kB
  • sloc: ansic: 36,071; sh: 10,354; asm: 3,290; makefile: 960; lisp: 123; perl: 109; awk: 43
file content (14 lines) | stat: -rwxr-xr-x 181 bytes parent folder | download | duplicates (12)
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