|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
automatig a prgm using "Expect"
I'll be greatful if Any of u Scriptor's there can help me out automating A program that i need to run on every start up. Its called 24. I must tell u the Exact thing i do. I have copied the executable to /usr/bin.
at console i do this EXACTLY to make it login:- # 24 -u GaganPaul (then press enter) password: (asks password, put "cute" i.e. my passwd, enter) it then logs in & to check i ping yahoo.com. if ping is success i am logged into my gateway. Can u write me a Single file, doesnt need to have args as i can hardcode my username & pass(no security issues here) & just call it in the rc.d to autorun at start up I heard "Expect"(a tcl application) can do that user intake kionda thing along witha combination of a "send" command. My program file is available at Sourceforge.net here http://sourceforge.net/projects/cyberoam |
|
#2
|
|||
|
|||
|
RE: automatig a prgm using
I wanted to do something similar but automate my https login information automatically. I have never had time to dive into this yet. Check out the news groups for some info here http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=ssl+expect+script&sa=N&tab=wg
Good luck |
|
#3
|
|||
|
|||
|
RE: automatig a prgm using
try autoexpect. It comes with the expect distribution. you simply type 'autoexpect', and it'll automatically record what you type, then type 'control-D' to quit recording.
You don't specifically state what kind of a return you are looking for, but, chances are, you'd need to capture the exit status of ping to know if it was successful or not, and act accordingly. Most pings exit 0 when the host responded, 1 if not. You'd probably have to delve into TCL to figure out how to do this, though. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > automatig a prgm using "Expect" |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|