How to pass arguments to program been exec'ed 
Author Message
 How to pass arguments to program been exec'ed

I am writing a Tk frontend to a perl script. I am
exec'ing the script and trying to pass command line args
I use a variable to set a command line option like this
      set procopt "-dec 3"
and then this
    "exec -- vpla -v -i $infile \

Perl complains about saying
 > Unknown option: dec 3
Seems the Tcl/Tk parser cuts (all) the trailing - from vars. Is this
right?
Workaround?

Thanks in advance

PS
I use a var so the user can supply an empty string ""
-----------------------------------------------------------------------------
Dipl.Ing. Cristiano NOVELLO                             ...more fun

-----------------------------------------------------------------------------



Tue, 07 May 2002 03:00:00 GMT  
 How to pass arguments to program been exec'ed



Quote:
>I am writing a Tk frontend to a perl script. I am
>exec'ing the script and trying to pass command line args
>I use a variable to set a command line option like this
>      set procopt "-dec 3"
>and then this
>    "exec -- vpla -v -i $infile \

>Perl complains about saying
> > Unknown option: dec 3

                        .
                        .
                        .
Try
  eval exec -- vpla -v -i $infile \

Then read
<URL:http://starbase.neosoft.com/~claird/comp.lang.tcl/fmm.html#exec>.
--

Cameron Laird           http://starbase.neosoft.com/~claird/home.html



Tue, 07 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using import in an exec'ed string

2. return val of exec'ed prog

3. interaction with exec'ed process

4. waiting for an exec'ed process to finish

5. Redirecting output of a exec'ed application

6. Q: interacting with exec'ed commands ?

7. Capturing output from exec'ed command

8. Arguments to exec with '<'

9. Difference in exec argument passing at Tcl/Tk 8.4

10. arguments passing with exec

11. can exec pass an argument starting by <

12. passing arguments to "exec"

 

 
Powered by phpBB® Forum Software