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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling shell name

Status
Not open for further replies.

ytakbob

Programmer
Jul 20, 2000
105
US
I call a tclprogram from a Kornshell (AIX)

from kornshell testit_sh
#!/bin/ksh
/hmu/scripts/testit.tcl

I want testit.tcl to be able to knwo who called it.

$arv0 from within testit.tcl gives "testit.tcl"
What variable would have "testit_sh" - the calling program ?

Thanks
 
I'd add "$0", ie:

/hmu/scripts/testit.tcl $0

and read it as the first arguement passed:
[lindex $argv 0]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top