HELP Using telnet command in shell script
I want to test connectivity between different servers using telnet.
I have Name,IP List and port in one file. Please help how i can test connectivity is successful or not? File format will be: Name1,127.0.0.1,80 Name2,127.0.0.2,8080 Output could be Name1, Successful Name2, Unsuccessful I have prepare the code which uses curl and execute complete URL which is as follows: for url in $(awk -F"," '{print $3}' cp_urls.txt) do curl -s -o "/dev/null" $url if [ $? -eq 0 ] ; then echo "$url = running" else echo "$url = not running" fi done But i want to test connectivity between IP and port number specified. Please suggest. |
you could use the netcat command (sometimes nc)
The version I have has even a command for this see man nc: " -z zero-I/O mode [used for scanning]" |
All times are GMT -5. The time now is 09:14 AM. |