Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Splitting up quoted/escaped command line arguments

by choroba (Canon)
on Feb 11, 2014 at 18:10 UTC ( #1074461=note: print w/ replies, xml ) Need Help??


in reply to Splitting up quoted/escaped command line arguments

It seems the arguments are already properly quoted in the database to be part of one string. Why don't you use just the exec $string?

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Splitting up quoted/escaped command line arguments
Download Code
Replies are listed 'Best First'.
Re^2: Splitting up quoted/escaped command line arguments
by Tommy (Chaplain) on Feb 11, 2014 at 18:23 UTC

    ...Because that sends it through a shell. I need to avoid that.

    Tommy
    A mistake can be valuable or costly, depending on how faithfully you pursue correction
      But hose commands would not work unless you pass them through a shell!

      Or if you prefer to view it from a different angle, you will have to implement in your program all the shell functionality used by those commands!

      Update: And BTW, if those commands involve calling ssh, then a shell would be invoked at the remote side. This is an unavoidable feature of the SSH protocol.

        Yes, I'm keenly aware that a shell is going to be invoked on the remote side. That's fine. I need to avoid it on the local machine. Why do you say that these commands won't work unless passed to a shell vs calling ssh directly? The perldocs don't seem to agree with your assertion.

         

        Tommy
        A mistake can be valuable or costly, depending on how faithfully you pursue correction
      I need to avoid that.
      Why?

        I'll potentially be doing hundreds of these calls in parallel and I have to avoid the overhead of shelling out every time. I've already tested and the difference is very significant when opening to ssh vs opening to a shell opening to ssh. There's a huge slowdown on the local machine when I involve the shell.

        Tommy
        A mistake can be valuable or costly, depending on how faithfully you pursue correction

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1074461]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2015-07-30 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls