| Author |
Message |
omara007
Joined: 06 Jan 2003 Posts: 1149 Helped: 35 Location: Dubai
|
06 Aug 2008 15:44 How to source a CSH file from inside a TCL script ? |
|
|
|
| as in the topic
|
|
| Back to top |
|
 |
gliss
Joined: 22 Apr 2005 Posts: 659 Helped: 61 Location: Boston Metro Area
|
06 Aug 2008 17:37 How to source a CSH file from inside a TCL script ? |
|
|
|
| You don't technically "source" CSH scripts from TCL scripts but you can use the 'exec' command in TCL to run CSH scripts or programs.
|
|
| Back to top |
|
 |
omara007
Joined: 06 Jan 2003 Posts: 1149 Helped: 35 Location: Dubai
|
06 Aug 2008 19:57 Re: How to source a CSH file from inside a TCL script ? |
|
|
|
| gliss wrote: |
| You don't technically "source" CSH scripts from TCL scripts but you can use the 'exec' command in TCL to run CSH scripts or programs. |
I have effectively tried 'exec' .. but unfortunately it didn't work with source as source is a shell-embedded command .. unlike 'mkdir' for example, which is a program under 'bin' ..
Did you try yourself doing that ? ..
In order to make my point clear, try to do (which mkdir) and (which source) to see the difference between a program like (mkdir) and a shell-embedded command like (source) ..
|
|
| Back to top |
|
 |
gliss
Joined: 22 Apr 2005 Posts: 659 Helped: 61 Location: Boston Metro Area
|
06 Aug 2008 20:27 Re: How to source a CSH file from inside a TCL script ? |
|
|
|
| I still don't know why you need to run 'source'. Post your TCL code.
|
|
| Back to top |
|
 |
omara007
Joined: 06 Jan 2003 Posts: 1149 Helped: 35 Location: Dubai
|
06 Aug 2008 22:07 Re: How to source a CSH file from inside a TCL script ? |
|
|
|
| gliss wrote: |
| I still don't know why you need to run 'source'. Post your TCL code. |
I have 2 different CSH files .. according to the value of a certain variable (declared in a TCL script), I need to source only one CSH file .. but not the other ..
What is the problem with sourcing a file from inside a TCL script !
|
|
| Back to top |
|
 |
gliss
Joined: 22 Apr 2005 Posts: 659 Helped: 61 Location: Boston Metro Area
|
07 Aug 2008 16:08 How to source a CSH file from inside a TCL script ? |
|
|
|
| you can source other TCL from within TCL scripts but you exec CSH scripts or other binary programs from within TCL scripts.
|
|
| Back to top |
|
 |
omara007
Joined: 06 Jan 2003 Posts: 1149 Helped: 35 Location: Dubai
|
07 Aug 2008 17:11 Re: How to source a CSH file from inside a TCL script ? |
|
|
|
| gliss wrote: |
| you can source other TCL from within TCL scripts but you exec CSH scripts or other binary programs from within TCL scripts. |
would you please give an example code for sourcing a csh script from inside a TCL script .. cuz I tried using this :
| Code: |
| exec source xyz.csh |
and it didn't work
|
|
| Back to top |
|
 |
gliss
Joined: 22 Apr 2005 Posts: 659 Helped: 61 Location: Boston Metro Area
|
|
| Back to top |
|
 |
omara007
Joined: 06 Jan 2003 Posts: 1149 Helped: 35 Location: Dubai
|
08 Aug 2008 16:32 Re: How to source a CSH file from inside a TCL script ? |
|
|
|
What do you mean by make sure it's executable ? .. the CSH file I have is simply a working csh script that I usually use with no problem thru my csh .. now, I need to invoke it from a TCL script .. that's it ..
I will try and let u know ..
|
|
| Back to top |
|
 |