in reply to Change Directory

No. A child process cannot affect the state of the parent in POSIX.

You can source, or . (dot) a shell script to do that.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Change Directory
by Zaxo (Archbishop) on Jul 19, 2005 at 10:36 UTC

    In your file, no splatline needed,

    # ~/file.rc # do stuff chdir /path/to # do more stuff
    Then on the command line,
    ~>$ source file.rc /path/to>$

    After Compline,
    Zaxo

Re^2: Change Directory
by Anonymous Monk on Jul 19, 2005 at 10:28 UTC
    Thanks, but I tried to do it with source via a shell script, like
    # main
    #! /bin/sh

    source "./changeDir" ;

    # file changeDir
    cd a

    But that didn't work, can you tell me why ?

    Luca