Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: how to send input to stdin automatically?

by skyworld_chen (Acolyte)
on Dec 18, 2012 at 08:37 UTC ( [id://1009310]=note: print w/replies, xml ) Need Help??


in reply to Re: how to send input to stdin automatically?
in thread how to send input to stdin automatically?

Hi tobyink,

thanks for your kind reply. You are right, I do need to send password to keyboard, not STDIN. I have tried code you suggested, but the linux still asks for the password. My code is as this:

#!/usr/bin/perl open my $pipe,'|-', 'cvs update'; print {$pipe} "my_password\n"; close $pipe;

did I miss something? thanks.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-24 00:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found