0
set newarg [join $argmnts " "] 
set msg [exec $fname arguments] 

Note : argmnts are not commandline arguments, it is from value_dialog_box

newarg is a list of arguments (no. of arguments may vary in newarg), fname is some file name. I want to pass these arguments (newarg) in [exec $fname arguments]

how can i do that ?

1 Answer 1

3

You're looking for argument expansion:

set msg [exec $fname {*}$argmnts]

which treats the elements of the list in $argmnts as individual arguments to exec.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.