Bash CD || sortir

cd "$foo" || { echo "Error xyz"; exit 1; }
AttractivePenguin