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

Re^3: Capturing bash output without displaying STOUT in terminal

by ikegami (Patriarch)
on Sep 08, 2016 at 21:36 UTC ( [id://1171439]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Capturing bash output without displaying STOUT in terminal
in thread Capturing bash output without displaying STOUT in terminal

Some programs (e.g ssh when asking for a password) write directly to the terminal, not STDOUT.

$ ssh ikegami@209.197.123.153 2>&1 >/dev/null ikegami@209.197.123.153's password:

You have to create pseudo-tty's (as Expect does) in that case.


IPC::Run supports capturing STDOUT and STDERR separately, and easily. It even supports pseudo-tty creation if you need them.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-03-28 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found