How to source a file in KSH -- Please help !!!

Hi,
Can anyone tell me how to source a file inside a KSH script.
I can do it in CSH using the "source" command.
source /home/tipsy/sourceme.prf

What is the equivalent command in KSH? I tried "exec" but after executing the statement no furthers statements are executed.

Please let me know.

Regards,
Tipsy.

. /home/tipsy/sourceme.prf

Thanks that worked.

I was trying . ./home/tipsy/sourceme.prf and breaking my head.

Regards,
Tipsy.

That would work if your current working directory is "above" where "home" is. So if "home" is somewhere like /u01/home, then, if your current working directory is /u01, then your attempt would work. Since you said that my suggestion worked, your "home" is mounted from "/" and will allways fail.

I have some common parameters established by setenv in a csh file.
I can "source" this file ( " source /path/aaa.csh " ) from inside a csh file and then access those parameters from the calling script.

I wish to source the same csh file from inside a ksh script; but the ksh script processor refuses to recognize the #!/bin/csh statement in the csh file; and therefore refuses to process a setenv; it expects an export statement.
(I used " . /path/aaa.csh " in the ksh script)

I don't want to create a ksh version of this parameter file. Is there a way to source a csh file from a ksh calling routine?

Thank for any insight and guidance you can provide.

I have this exact, same question. Did you ever get an answer to come up with an alternate solution?

Did you ever get an answer OR come up with an alternate solution?

I don't think there is any sane way to source a csh script from a ksh script, no. Their syntaxes are different. "Source" means the invoking interpreter interprets the script, which doesn't work if it uses an alien syntax.

However, converting a csh script to Bourne-compatible syntax is often possible. (Might as well replace the wicked csh script for good then -- make the world a better place.)