I have a KSH script that exports an environment variable (export SOME_VAR=123
)
After running the script my current shell is unaffected and echo $SOME_VAR
produces nothing.
I tried running . myScript.ksh
but got the following error:
.: Permission denied.
Permissions for .
are drwxr-xr-x
Any idea? (I'm not root)
myScript.ksh
have? Is it readable? (Using. name
is the correct way, since a process cannot update its parent's environment, which is why running the script "as a script" did not work.)-rwxr-xr-x
- and it runs when invoking it without.
before it. Can it be related to the fact my shell is TCSH?