Digital Marketing

Check if in right directory on Linux

cd $MY_DIR

if [ `pwd` != "$MY_DIR" ] # or if [ "$PWD" != "$MY_DIR" ]
# Not in the right directory
then
echo "Can't change to $MY_DIR."
exit $E_XCD #E_XCD=86
fi

Comments

Popular posts from this blog

Fixed WSL sshd: no hostkeys available -- exiting

PowerMTA pmta command

How to fix: mv: failed to preserve ownership