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
In reply to Re: [OT] 'perl' is not the 'perl' reported by 'which perl'
by jo37
in thread [OT] 'perl' is not the 'perl' reported by 'which perl'
by syphilis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |