Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Alan Bennett said:I don't mind people who aren't what they seem. I just wish they'd make their mind up.
#!/bin/ksh
# Hide the messages about terminated processes.
exec 2> /dev/null
function testport()
{
(
if sleep 10
then
ps -o pid,comm | awk 'NR > 1 && /telnet/ {print $1}' | xargs -r kill
fi
) &
if telnet $1 $2 < /dev/null 2>&1 | grep -1 '^Connected'
then
RETURN=0
else
RETURN=1
fi
ps -o pid,comm | awk 'NR > 1 && /sleep/ {print $1}' | xargs -r kill
return $RETURN
}
testport localhost 26 && echo localhost 26 is open || echo localhost 26 is closed
testport nothing 26 && echo nothing 26 is open || echo nothing 26 is closed
testport localhost 25 && echo localhost 25 is open || echo localhost 25 is closed
testport example.com 25 && echo example.com 25 is open || echo example.com 25 is closed