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!

wish restarting

Status
Not open for further replies.

pankajpanjwani

Technical User
Mar 25, 2002
24
EU
#!/bin/sh
# this will restart wishexec wish "$0" "$@"
the above works, but
the with csh... .

#!/bin/csh
# this will restart wishexec wish "$0" "$@"

doesn't work.

Expecting experts here to come with some strong reason
-Pankaj
 
Been a long time since I've doen any C shell hacking. But it doesn't work in all probability simply because the Bourne shell and C shell have radically different syntax. The "exec" line shown above is Bourne shell syntax; there's no good reason to expect it to work with C shell.

Solution? Stick with the Bourne shell invocation. There's no compelling reason to craft a C shell version of the invocation. The Bourne shell runs only long enough to start the Tcl interpreter and pass any arguments to it. For an explanation of why this invocation is often needed and how it works, go to the Tcl'ers Wiki ( and check out the page "exec magic," - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Avia,
thanks for response. I am now more clear about the magic variables.
I could also find a solution to other problem of detecting the file type and invoking wish or tcsh accordingly.
thanks again
Pankaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top