Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: control terminal width

by broomduster (Priest)
on Oct 07, 2008 at 22:19 UTC ( #715865=note: print w/replies, xml ) Need Help??

in reply to Re^2: control terminal width
in thread control terminal width

Drop the quotation marks (the ones inside the qw):
$object->stty(qw(cols 200));
What you have is passing "cols and 200" to stty, which it does not recognize (as indicated in the error messages). Also note that according to the docs, you probably want to be using the slave side of the pty:
$object->slave->stty(qw(cols 200));

Replies are listed 'Best First'.
Re^4: control terminal width
by jmclark (Novice) on Oct 08, 2008 at 14:40 UTC
    Also, looking at I don't see that cols is a valid parameter which makes since with that error msg.
Re^4: control terminal width
by jmclark (Novice) on Oct 08, 2008 at 13:54 UTC
    Yea, thats what I was saying, I tried without quotes as well.
    Basically below is what I have:
    $acnsex = new Expect(); $acnsex->slave->stty(qw(cols 200)); $acnsex->spawn("ssh -q -o 'UserKnownHostsFile ./output/keys.txt' -o 'S +trictHostKeyChecking no' -l $username $acns"); $acnsex->log_user(0); $acnsex->expect(10, '-re', 'password:');

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2020-12-01 15:46 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (11 votes). Check out past polls.