I am write some bash code like this:
Code: Select all
echo ${XYZ:-~/.vimrc}Code: Select all
sudo ./foo.shCode: Select all
/root/.vimrcBut at other OS (Ubuntu and OS X), I got this (mitnk is my username):
Code: Select all
/home/mitnk/.vimrcPRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
Can anyone explain why it's not `/home/pi/.vimrc`? Thanks.