On Tue, Mar 3, 2009 at 11:19 AM, Gabriel Briones <[email protected]> wrote: > Hi List, > Just want to ask how can I handle this "--- more ---" prompt thing using > expect > I have a very simple expect script which is working fine but screwed up if > output is more than a screen size. It gives me a "-- more --" prompt and I > need to press space bar or enter key to get the remaining output. > I have a very limited knowledge when it comes to expect scripting and i'm > seeking for any help here in the list who has tried this > Below is my 4 liner expect script > spawn ssh u...@remote-server > expect "<prompt>" > send "<command>\r" > send "exit\r"
according to your expect script.. you are waiting for the command prompt, execute the command and then exit... why not use ssh to execute the command on the remote side? eg. $ ssh u...@host command it will do exactly the same with your expect script.. unless you need more interaction during the execution of that command thus you need the expect utility... fooler. _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List http://lists.linux.org.ph/mailman/listinfo/plug Searchable Archives: http://archives.free.net.ph

