Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: feeding stdin of executed command and store stdout in $var

by gabrielsousa (Sexton)
on Jan 25, 2017 at 14:26 UTC ( [id://1180297]=note: print w/replies, xml ) Need Help??


in reply to Re: feeding stdin of executed command and store stdout in $var
in thread feeding stdin of executed command and store stdout in $var

how i send several commands with IPC::run ?
  • Comment on Re^2: feeding stdin of executed command and store stdout in $var

Replies are listed 'Best First'.
Re^3: feeding stdin of executed command and store stdout in $var
by haukex (Archbishop) on Jan 25, 2017 at 14:43 UTC

    Hi gabrielsousa,

    how i send several commands with IPC::run ?

    IPC::Run's interface takes a little bit of getting used to, but have a look at the doc and example code of the pump() function.

    Regards,
    -- Hauke D

      my @cmd=('lftp', '-u', "$user,$pass", '-e', "open", "$host"); my $h = start \@cmd, \$in, \$out, \$err, timeout( 10 ); $in .= "ls\n"; $in .= "ls\n"; pump $h; print $out; finish $h;
      do not work :( only print after the finish $h;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found