File: pwhich

package info (click to toggle)
pact 980714-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 13,096 kB
  • ctags: 26,034
  • sloc: ansic: 109,076; lisp: 9,645; csh: 7,147; fortran: 1,050; makefile: 136; lex: 95; sh: 32
file content (18 lines) | stat: -rwxr-xr-x 304 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/csh -f
#
# PWHICH - a silent, unbuggy which, used by PACT manager
#        - does not do alias substitution which ought not to matter here
#
#  Arguments same as for which
#

foreach i ($path)
   if (-e $i/$1) then
      echo $i/$1
      exit(0)
   endif
end

echo "No $1 found in $path"

exit(1)