A good idea would be to read about BASH exit-codes and BASH Scripting if you want to do it in the BASH.
You may however, have to cleanly exit the telnet command itself (something for you to work out yourself).
If you want to do it in Perl, maybe you should/could read up on IO::Socket::INET and Net::Telnet.
In reply to Re: Return value of telnet using shell scripting
by kabeldag
in thread Return value of telnet using shell scripting
by bala_999
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |