in reply to [OT] 'perl' is not the 'perl' reported by 'which perl'
This might be caused by bash's hashing. Like this:
jo@bear$ PATH=/home/jo/bin:/usr/local/bin:/usr/bin:/bin jo@bear$ cat <<EOF >tellme.sh > #!/bin/bash > echo this is tellme.sh from /usr/local/bin > EOF jo@bear$ chmod +x tellme.sh jo@bear$ sudo cp tellme.sh /usr/local/bin jo@bear$ which tellme.sh /usr/local/bin/tellme.sh jo@bear$ tellme.sh this is tellme.sh from /usr/local/bin jo@bear$ cat <<EOF >tellme.sh > #!/bin/bash > echo this is tellme.sh from ~/bin EOF jo@bear$ cp tellme.sh bin jo@bear$ which tellme.sh /home/jo/bin/tellme.sh jo@bear$ tellme.sh this is tellme.sh from /usr/local/bin jo@bear$ hash -d tellme.sh jo@bear$ tellme.sh this is tellme.sh from /home/jo/bin
Greetings,
-jo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2:[OT] 'perl' is not the 'perl' reported by 'which perl'
by LanX (Saint) on Aug 21, 2020 at 17:46 UTC | |
by eyepopslikeamosquito (Archbishop) on Aug 21, 2020 at 22:38 UTC | |
by kcott (Archbishop) on Aug 22, 2020 at 01:55 UTC | |
by trippledubs (Deacon) on Aug 24, 2020 at 01:39 UTC |