Invoking a ksh script with a dot means that it runs in the current processQuote:> What is the significance of placing a dot in front of a shell script ?
> ( I am using the KORN shell)
> Can anyone explain why my session gets terminated when I place a dot and
> why not when the dot is not placed ?
rather than a separate process being forked or exec'd (I don't remember
which). So when you get to an exit at the end of the script, it closes the
current process. If you plan to invoke the script with a dot, you must
make sure that it does not have any exit statements in it.
The reason that scripts are invoked with a dot, it because that allows the
environment to be updated. If I run a script, and the script does a cd and
sets some variables, when return is controlled to me, the environment
returns to what it was before I invoked the script. If I invoke it with a
dot, then the changes are made to the current process, so they are
ADP Custom Programming