Hi, > I was writing a few lines of script to change the *pwd* of my BASH to my > *project workspace* whenever i call it (because its a long path) > > #!/bin/bash > DIRECTORY="/home/varrun/Desktop/TODO/Final_yr_project" > if [ -d "$DIRECTORY" ]; then > echo "exists" > cd $DIRECTORY > else > echo "project directory either wrong or doesnt exist" > fi > > When i run it, the directory of my terminal does *not* change i guess > because a child process cannot pass arguments to a parent process. > Is there any other way i can do this?
Well, I think it should not change the directory of the calling terminal, but within the script the directory will change. Try echoing $PWD after the cd command. Abishek _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
