On my macOS machine, I noticed that sometimes the which
command returns paths with two consecutive slashes. For example:
bash-3.2$ which gcc
/usr/local/bin//gcc
bash-3.2$ which qr
/Users/flyingblu/bin//qr
However, for some programs which
returns normal paths.
bash-3.2$ which bash
/bin/bash
bash-3.2$ which which
/usr/bin/which
I tried these commands in both bash and zsh, and their outcomes are the same.
I have never seen this in Linux systems, what is the reason for the two consecutive slashes?
echo $PATH
show ?