Thanks, Larry that works great. Jeff Birt Electronics Engineer Integrated Systems Facility University of Missouri - Rolla 573.341.6058
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry W. Virden Sent: Wednesday, April 28, 2004 11:49 AM To: [EMAIL PROTECTED] Subject: Re: [vtcl-user] A few newbie Tcl/Tk, Visual Tcl observations > It seems to get confused if more than three switches are used after > the argument, also each switch had to be held in a seperate variable: > exec rdesktop $sw1 $sw2 $sw3 $ip. What you were looking for was the Tcl "eval" command. set args [list -l -t -r] eval exec ls $args /tmp When you call exec, it executes the command represented by its first argument, passing it as separate arguments the value of each variable. So, in the above case, if I had incorrectly tried exec ls $args /tmp then my ls command would have received 2 arguments. The first would have been "-l -t -r" and the second "/tmp" . Now, ls has no idea what an argument of "-l -t -r" is - it knows things like "-l" and "-t" and "-r" ... but not those spaces in there. -- Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ > Larry W. Virden <mailto:[EMAIL PROTECTED]> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ vtcl-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/vtcl-user ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id�66&op=click _______________________________________________ vtcl-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/vtcl-user
