I'm calling a TCL procedure like this-
::f::abstract -procname my_proc -args "-arg1 $a -arg2 $b"
Now here $a
itself is something like this-
"ping -c 1 10.1.1.$ip"
When I try to run this, $a
is expanded, and it becomes-
-args "-arg1 ping -c 1 10.1.1.27 -arg2 a2"
This gives an error because now it appears we have additional arguments like -c.
What I want is to take in $a
as as a whole, and later on expand it inside the procedure.
How do I do that?
I can't use {}
brackets because I need variable substitution. I can't remove quotes because the outer quotes take in args
.