http://qs1969.pair.com?node_id=1171439


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.