Add eval before cd
Code:
#!/bin/sh
echo Where do you want to install the package? [$INSTALL_DIR]
read new_install_dir
eval "cd $new_install_dir"
echo "You are in $(pwd) directory"
eval used to read and concatenated together into a single command. This command is then read and executed by the shell. If there is a space between dirname it will not work e.g. "~/dir name"
HTH
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!
If you have knowledge, let others light their candles at it.
Certified to work on
HP-UX /
Sun Solaris /
RedHat