You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
New to tcl.
My system is linux and when I run from a terminal "echo $?" it returns
0 or 1 depending on the last command result.
Under tclsh when I run "exec echo $?" it returns "$?" where I expected
to see 0 or 1 !
what am I doing wrong?
thank you for your help
T
Bruce
unread,
Feb 8, 2012, 10:43:43 AM2/8/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
$? is a shell variable. Tcl's exec does not use a shell.
if you are exec'ing a command and need to know the return value
you get that directly with exec (and catch) - see man page for exec