Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

use exec to execute one script file from another

Status
Not open for further replies.

latal

Programmer
Nov 14, 2002
1
GR
I am trying to execute one script file from my main script
by using &quot;exec <filename>&quot;.
The following error message appears :
end of file' unexpected
I work under Solaris OS and the file that I invoke with
exec contains only plain tcl commands.
In general, how can I execute one script file from another ?

Could anybody help ?
 
I'm not quite sure what is causing the specific error message you're getting. But more generally, if you're trying to exec one Tcl script from another script, keep in mind that you actually need to exec the tclsh interpreter and pass the script name as the first argument. For example:

Code:
exec tclsh otherScript.tcl

Also remember that if tclsh isn't in your PATH, you'll need to use the absolute path to tclsh in your exec command. - Ken Jones, President, ken@avia-training.com
Avia Training and Consulting, 866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top