Hi,
any ideas why ${PATH} is messed up / returns different content?
while following command returns other PATH content:
Have a look at my RC files:
Returns nothing, since PATH has not been set in it.
Why is ${PATH} not having the properties of /etc/bashrc?
any ideas why ${PATH} is messed up / returns different content?
Code:
ssh admin@192.168.10.52 '/bin/echo ${PATH}'
/usr/bin:/bin
Code:
Leander@FreeBSD-01 [~]$ ssh admin@192.168.10.52
admin@FreeBSD-02 [~]$ echo ${PATH}
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
Code:
admin@FreeBSD-02 [~]$ cat ~/.bashrc
if [ -d /etc ] && [ -f /etc/bashrc ]; then
source /etc/bashrc
elif [ -d /usr/local/etc ] && [ -f /usr/local/etc/bashrc ]; then
source /usr/local/etc/bashrc
fi
Code:
admin@FreeBSD-02 [~]$ cat /etc/bashrc
export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin"
Code:
admin@FreeBSD-02 [~]$ ls -lach /usr/local/etc/bashrc
lrwxr-xr-x 1 root wheel 11B Aug 29 21:14 /usr/local/etc/bashrc -> /etc/bashrc
Code:
cat /etc/profile | grep 'PATH'
Why is ${PATH} not having the properties of /etc/bashrc?