Changing Directory

William Davidsen davidsen at sungod.crd.ge.com
Thu Aug 3 04:30:03 AEST 1989


  Your shell probably has CDPATH, so you can put the pathname-1 there.
You can also define a symbol at startup:
	foo=/big/long/ugly/path
	cd $foo
You need to execute the script in the current shell rather than a
subshell, so the . command is used in shell.
	$ cat foo
	cd /big/local/ugly/path		# this is the script
	$ . foo				# this will do what you want
QED
	bill davidsen		(davidsen at crdos1.crd.GE.COM)
  {uunet | philabs}!crdgw1!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.questions mailing list