Set log_stdout AFTER the spawn worked for me (it did not work if it was set before the spawn):
Apologies for answering an oldie, but it helped me.$exp->spawn("su - root"); $exp->log_stdout(0); ## <<AFTER the spawn
In reply to Re: Expect prints command to console
by Anonymous Monk
in thread Expect prints command to console
by daphnaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |