LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Telnet automation script (https://www.linuxquestions.org/questions/linux-newbie-8/telnet-automation-script-600753/)

senthilvael 11-19-2007 04:38 PM

#!/bin/bash
clear
sleep 1
if [ "$(nmap -P0 -p25 1.2.3.4 | grep open)" ]
then
echo SMTP is ok in 1.2.3.4
else
echo SMTP problem in 1.2.3.4
fi
sleep 1
if [ "$(nmap -P0 -p110 1.2.3.4 | grep open)" ]
then
echo POP is ok in 1.2.3.4
else
echo POP problem in 1.2.3.4
fi
...........................................................................
I checked. Its working perfectly.
Thank you Chris,Tink,Hewson


All times are GMT -5. The time now is 08:06 PM.