Hi

On Thursday 29 April 2010 06:47:55 hadi motamedi wrote:
> I need to schedule for a repeated task, as the followings:
> -) Telnet to a remote node
> -) Issue a command
> -) Capture the output in a log
> -) Logout from Telnet
> -) Wait for a prescribed time interval
> -) Then redo , but append the subsequent output in just on file
> Can you please let me know which options do we have to write such a task?

My take would be to use "expect" to do the telnet business, the output of the 
script you could then simply collect on the host (along with some telnet 
stuff, but parsing that should be easy), i.e. something like

while true; do
/path/to/my/expect/script >> output
sleep 500
done

simple expect script looks like

http://www.osix.net/modules/article/?id=30

HTH

Carsten
_______________________________________________
Solaris-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/solaris-users

Reply via email to