When ever i started my terminal,Every time I have to change the directory like "
cd user/documents/ravi/folder2/folder3
" Without typing this entire command every time ,I placed "
alias c='cd user/documents/ravi/folder2/folder3'
" in .bash_profile file. so that i can able to execute command 'c' from any directory without any issues . But my requirement is --> the command "
cd user/documents/ravi/folder2/folder3
" should be in a shellscript . I want to execute that script to change the directory from anywhere . For that i have created one script (change.sh) having content [ICODE]echo "change script "
cd user/documents/ravi/folder2/folder3[/CODE]" in user/documents directory . In .bash_profile file i put "
export PATH=$PATH:user/documents
" . No i can able to execute the script from any where . I am getting output as change script . when i am trying to print present working directory PWD ,It is not getting to change the directory . the problem is --the output of changing the directory from script is not getting redirected to terminal . Can any one help me to come out of this ......