I have this script in a file called /Users/tcl/scripts/gotoroot:
echo "hello"
cd /
echo "good bye"
But when I run it I get this:
User:scripts tcl$ pwd
/Users/tcl/scripts
User:scripts tcl$ gotoroot
hello
good bye
User:scripts tcl$ pwd
/Users/tcl/scripts
User:scripts tcl$
The directory has not changed and I don't know why? It should be /, not /Users/tcl/scripts