I'm writing a simple bash script to create a new directory. The last line to cd into the $dir is not executing. If I change it to echo "Hello world" it works, if I change it to cd ../, it does not work. Everything else in the script is functioning as it should.
clear
read -p "Directory Name : " name
echo "Creating a directory called " $name
cd ~/Sites
mkdir $name
cd $name