summaryrefslogtreecommitdiff
path: root/bin/pdksh/tests/th.sh
blob: 6e40c19dcf9398adaa2ab70a2a558f22ab1e0af0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

#
# Simple script to find perl and run it
#

IFS=:$IFS
perl=
for i in $PATH; do
    [ X"$i" = X ] && i=.
    for j in perl perl4 perl5 ; do
	[ -x "$i/$j" ] && perl=$i/$j && break 2
    done
done

[ X"$perl" = X ] && {
	echo "$0: can't find perl - bye\n" 1>&2
	exit 1
    }

exec $perl "$@"