[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can ksh script alter the environment of parent bash?

From: Dennis Liu
Subject: Can ksh script alter the environment of parent bash?
Date: Wed, 01 Aug 2001 16:54:42 +0800

        I have some ksh scripts that use some features that bash haven't. And 
scripts set some environment variables. When running under ksh with the "."
command, Everything goes smoothly. But when running under bash, syntax error
        I tried to add a "#! /usr/bin/bash" at the top of the script file, but 
when I
invoke it with "." syntax error still occurs. I understand that this is because
"." in bash means that "run the script in the current shell".
        And because these script is interactive, the "cat scriptfile | ksh" 
won't work.
        Currently the only solution I can think of is to use ksh as my login 
shell, and
invoke bash in the .profile. When I need those script, exit to ksh and run them,
and then type "bash" to go back again. This is boring and I lost all the
environment I set during last bash session.
        Can anyone kindly tell me how to do that?

Dryice Liu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]