Hey guys,
i want to be able to get rid of the following output that telnet spits out to the terminal. i have a script that runs telnet to about 5 hosts and checks to make sure connectivity works.
Connection closed by foreign host.
Connection closed by foreign host.
Connection closed by foreign host.
Connection closed by foreign host.
how can i do this? i dont want the script to spit this stuff out and grepping -v doesnt work to get rid of it.
A line from the script that involves telnet is:
echo ^C\n | telnet $line $PORT | grep "Connected"