[ale] telnet test

Joe Steele joe at madewell.com
Fri Apr 21 10:16:37 EDT 2006


James P. Kinney III wrote:
> That's pretty slick! It will leave an open connection if there is a
> listening process, though. Maybe a fork and a timer with a close/kill
> would work.
>   
Slick indeed!

This sort of test seems to avoid the open connection problem:

#!/bin/bash
if  > /dev/tcp/127.0.0.1/23 ; then
    echo open
else
    echo closed
fi 2> /dev/null

--Joe



More information about the Ale mailing list