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!

Problem runnig command with some characters. HELP!!!

Status
Not open for further replies.

garap88

Programmer
Feb 10, 2010
1
UY
Hi, I am working with a network simulator. An I am building a simple User interface with Tcl/Tk.
I need to execute the following command in the console when a push a button:

exactly like this:

./waf --run "scratch/third --runnum=$cli1 --cl=$cli2"

and $cli1 , $cli2 with their values obviously.
So... I use the following command:

exec xterm -e "./waf --run "scratch/third --runnum=$cli1 --cl=$cli2 ""

I would like that in the console the command executed where like the following:
./waf --run "scratch/third --runnum=2 --cl=4"

What should I use to make the interpreter ignore the pair of quotes inside in order to put them in the console??

Its the only thing missing in my entire proyect please!!!
 
It's probably simplest to see what's going on if you build your arguments as a string:
set s "scratch/third --runnum=$cli1 --cl=$cli2 "
then just use that in your OS call:
exec xterm -e "./waf --run $s"

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top