-----Original Message-----
From: Lucas King [mailto:[EMAIL PROTECTED]]
To: Sydney Linux Users Group
Subject: [SLUG] automating a telnet session using EXPECT

expect "LOGIN PROMPT"
send    "COMMAND TO BE EXECUTED"

the last EXPECT/SEND pair do not execute.

>> <<
That's because the script wasn't able to detect "LOGIN PROMPT". Depending on
your shell you may wish to replace "LOGIN PROMPT" with something like

expect { 
  *>*   { send "/bin/ls" }
  *#* { send "/bin/ls -l" }
}

'man expect' for more info. I am sure CPAN has a perl module that you can
download for this purpose. Can't remember which one though. Just do a search
in CPAN.

--SH
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to