16 lines
270 B
Plaintext
16 lines
270 B
Plaintext
|
#!/bin/sh
|
||
|
bestv=0
|
||
|
for p in $(whereis perl)
|
||
|
do
|
||
|
if [ "$p" != "${p%bin/perl}" ];
|
||
|
then
|
||
|
v=$($p -V:PERL_VERSION | sed "s/[^']*'//;s/'.*\$//")
|
||
|
if [ $v -gt $bestv ]; then
|
||
|
best=$p
|
||
|
bestv=$($p -V:PERL_VERSION |
|
||
|
sed "s/[^']*'//;s/'.*\$//")
|
||
|
fi
|
||
|
fi
|
||
|
done
|
||
|
echo $best
|