Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: calling a sh command which then asks for a password

by MZSanford (Curate)
on Oct 18, 2002 at 12:54 UTC ( #206291=note: print w/ replies, xml ) Need Help??


in reply to calling a sh command which then asks for a password

The problem maybe the leading newline produced after the "!"; ... if you try the following it may work better :

open2(\*Reader,\*Writer, "/usr/tools/prog start"); Writer->autoflush(); print "password\n";

This may still not work. Programs built for security (like ssh) often open a new TTY to prevent snooping ... if that's the case, it also prevent STDIN redirections like this.


from the frivolous to the serious


Comment on Re: calling a sh command which then asks for a password
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-10-23 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (123 votes), past polls