It is currently Tue, 17 May 2022 02:56:05 GMT

Author Message
 Unix Cd batch question

I am running tcsh 6.0? and noticed something interesting when trying to
get unix to cd into a directory. Ie. if i want it to cd /home/me/junk
and run this as a one line program it does not work. Why is that and how
do i fix it?

Evan R. Norfolk         \  INTERNET -
Lafayette College        \  VOICE - (215) 559 - 7101
Farinon Center Box 7965   \  BITNET - NORFOLK@LAFAYETT

 Mon, 06 Nov 1995 21:37:47 GMT   
 Unix Cd batch question
In <1993May20.133747.15...@Lehigh.EDU> (Grumpy) writes:

It sounds like you wrote a script and had it cd into a directory, then
you were surprised that when it exited the script, it returned to your
home directory.  Each shell keeps its own working directory, so the
subshell that runs the script exits and forgets about the cd that you

You need to use 'source' to read the script in the parent shell, or use
an alias to do the cd for you.

David DeSimone      | Rules of Creative Research:      |  1) Never draw what you can copy.
  If I said it, it  |  2) Never copy what you can trace.
 must be my opinion |  3) Never trace what you can cut out and paste down.

 Tue, 07 Nov 1995 07:04:16 GMT   
   [ 2 post ] 

Similar Threads

1. *** Simple batch-style Unix question

2. Unix questions: batch 4 of 5

3. bug in at/batch causes batch jobs to be truncated

4. Problems while running a batch ftp program on unix

5. Error in UNIX batch job

6. Calling Unix Batch Scripts

7. How to run a DOS batch program from UNIX script non-interatively

8. looking for Unix job scheduler / batch

9. Unix batch processing

10. sophisticated "batch"-job scheduler for UNIX-Systems

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software