Often, I find my self writing the following in BASH script,
if [ -f /very/long/path/tofile/name ]; then
do_someting /very/long/path/tofile/name
fi
For example:
if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then
source /usr/local/bin/virtualenvwrapper.sh
fi
The obvious way to short-cut it would be:
WRAPPER=/usr/local/bin/virtualenvwrapper.sh
if [ -f ${WRAPPER} ]; then
source ${WRAPPER}
fi
But I am wondering if there is some kind of a built-in variable to spare me the manual declaration?