Using "cd" in a bourne shell script

John Gayman john at wa3wbu.UUCP
Sat Oct 28 05:59:56 AEST 1989


   This has probably been discussed before so try not to flame me too
 much. :-)

   I'm trying to use "cd" in a bourne shell script to assist new users
 with an application. Its real simple:

 	who
	date
	cd /utils

   Now there are a few other things I can set before the "cd" command
 but you get the idea. As you know, what happens is that after I run the script
 I end up in the same directory I started from.  I seem to recall running
 into this before but for the life of me I cannot recall the solution.
 (don't you just hate that!) Obviously after running the above script I
 would want a "pwd" to return "/utils". Hope someone can clear the smoke
 for me on this one. Thanks.


						John


-- 
John Gayman, WA3WBU              |           UUCP: uunet!wa3wbu!john
1869 Valley Rd.                  |           ARPA: john at wa3wbu.uu.net 
Marysville, PA 17053             |           Packet: WA3WBU @ WB3EAH 



More information about the Comp.unix.questions mailing list