LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-25-2005, 05:07 AM   #1
vineet.k
LQ Newbie
 
Registered: Apr 2005
Distribution: RedHat
Posts: 17

Rep: Reputation: 1
Question putty display loops on listing directories with many files, through expect script


WHY
I use the expect script to ssh to a remote Linux terminal ( shell ). But when I list a directory containing hundreds of files the display goes in a loop from which I cannot escape other than typing exit. I use a putty software to ssh to the linux box from a microsoft platform.

What could be the reason and what can be the solution to it. Is there something which I have to specify in the expect script related to disply buffer or something ?

Please help me.
This has really stuck my work out here.

Regards,
Vineet.k
 
Old 06-25-2005, 06:29 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Posting your script would probably be helpful.. other than that, we're as clueless as you are without any helpful details..
 
Old 06-25-2005, 09:40 AM   #3
vineet.k
LQ Newbie
 
Registered: Apr 2005
Distribution: RedHat
Posts: 17

Original Poster
Rep: Reputation: 1
The script which use. to ssh is here

#!/usr/bin/expect --

set timeout 180
set machine [lindex $argv 0]
set password [lindex $argv 1]
set source [lindex $argv 2]
set destination [lindex $argv 3]
spawn ssh root@machine
expect "root@$machine's password: "
send "$password\n"
interact

After logining in if I list a directory contents with more than 100 files, the display gets looped up, (The listing never stops, and goes in a loop).

But if we type exit , the shell will exit to parent machine.

Need more explanation please update this ticket.

Regards,
Vineet.k
 
Old 06-28-2005, 05:38 PM   #4
vineet.k
LQ Newbie
 
Registered: Apr 2005
Distribution: RedHat
Posts: 17

Original Poster
Rep: Reputation: 1
looped Display on listing

Any clue ?
 
Old 06-30-2005, 08:23 PM   #5
vineet.k
LQ Newbie
 
Registered: Apr 2005
Distribution: RedHat
Posts: 17

Original Poster
Rep: Reputation: 1
Any params in expect scripting for setting the terminal params, like buffer, size and so on, on the remote shell on login using the above script.
Just want to try out if that helps me to fix this issue.

Regards,
Vin.K
 
Old 03-13-2007, 09:44 AM   #6
carine6540
Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
Question same problem with telnet rlogin ftp

Hello,

I'm newbie on the forum.
I know this is a very old post, but I have the same problem with expect script.
I try to list a directory on remote host and the display goes in a loop.

Have any ideas been found ?

Thanks in advance
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash, LS, For loops, and whitespaces in directories jhrbek Programming 27 09-22-2010 05:17 AM
for script: listing files which have space in filename hamish Linux - General 5 10-22-2005 09:25 AM
How to view directories through putty of a server jai_linux Linux - Software 2 07-10-2004 02:04 PM
Listing files in PuTTY for my RH9 root server Quincy Wisdom Linux - Newbie 3 07-04-2004 02:31 PM
Display wide listing of files and directories only? northfield Linux - General 3 08-21-2002 06:28 PM


All times are GMT -5. The time now is 05:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration