0
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)
What permissions does
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.) – user1686 – 2011-08-29T13:18:54.553The script's permissions are
-rwxr-xr-x
- and it runs when invoking it without.
before it.Can it be related to the fact my shell is TCSH? – RonK – 2011-08-29T13:29:36.827
Yes, it could. (See answer below.) – user1686 – 2011-08-29T13:34:38.163