Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Expect.pm 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: Expect.pm control terminal width
in thread Expect.pm 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: Expect.pm 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:');
Re^4: Expect.pm control terminal width
by jmclark (Novice) on Oct 08, 2008 at 14:40 UTC
    Also, looking at stty.pm I don't see that cols is a valid parameter which makes since with that error msg.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://715865]
help
Chatterbox?
[stevieb]: Jeff Healey cut of My guitar gently weeps
[stonecolddevin]: you don't recognize Prince. Prince tells you it's him.
[erix]: Alvin Lee (Ten Years After) played a jazzguitar ("Big Red"), a good warm sound
[stonecolddevin]: I think Stevie Ray is one of maybe 2 or 3 people that could take a Hendrix song and make you go "...huh. this is close." https://open. spotify.com/track/ 0UVM9trirBK5s1xBwL oVhZ
[stonecolddevin]: https://open. spotify.com/track/ 0UVM9trirBK5s1xBwL oVhZ rather
[Corion]: Sadly I must go to bed now :-| See y'all!
[erix]: I really loved/love this "Recorded Live" record, 1973 (yes, I'm that old)
[stonecolddevin]: goodnight Corion
[erix]: cya Corion :)
[stevieb]: Joan Jett, Hendrix, Neil Young, Dave Keuning (The Killers)... I have my mind elsewhere so I'm limited in my capacity to think about this righ tnow ;)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2017-06-22 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.