Hi , Two things which i wanted clarify
The reason behind the implementation is that we have multiple connections to various nodes through which files move in and out. so we are monitoring the ip also we are trying to implement the telnet functionality in this.
I have sorted out the ping command functionality by using grep option whihc would get the particular pattern and then decide accordingly.
Now the next step which i would be following is telnet.
so here i telnet to the ip with the port no
say for example
telnet 112.123.123.121 xxxx where xxxx is the port no
now here after this command is fired the telnet is connected and while logging out i type logout there and comeout. This is in case of a manual connection.
Now if i am implementing this int he script
telnet 112.123.123.121 xxxx > file1
`sleep 15`
'logout`
cat file1 | grep " connected"
if [ $? -eq 0 ]
then
echo " the node is up " | mailx -s " node connecitivty "
venkidhadha@in.com
The problem which happens here is that after loggin in the logout command doesnot work as now we are not in the original system where the scirpt is present.
How can do a remote logout of telnet so that the next step "LOGOUT" works?
Sorry if this seems to be a basic question.