how to get and save and then use the PATH value to make cd script?

view full story

http://www.linuxquestions.org – Hi folks, am trying to figure out a way to make my own cd script.. i thought that prompting the user to type in her destination then saving that input to PATH system variable will get it done! but it does'nt work here what i made (i think it's not that smart!) Code: clear echo "your current directory is" pwd read -p "Enter your destination path:" myPath # myPath is where i save the input of the user $PATH=myPath So i want a way to enable me to change the directory and to save it in the PATH and use it to take the user to his destination. Thanks (HowTos)