you can use tilda '~' you just need to have turned on the proper bash expansion key
set -x
or use either full path '/Volumes/Swap/Apps/...'
use bashrc to set env shortcuts like
export LocalApps=/Users/me/Applications
export SysApps=/Applications
i wouldn't use eval
if you just want to suck in a string from the command line you don't need to use read just grab the arg
if [[ $# -eq 1 ]]; then
#check if it's directory
if [[ -d $name ]] ; then
#do stuff here
else
echo 'bomb'
fi
else
usage
fi
instead of 'cd-ing' to a directory learn how to use ~+, ~-, pushd and popd,
many times you don't need to actually 'cd' into a directory
you might do something this
pushd $SysApps/$name
do stuff
popd
~
with$HOME
.