bash script to check if a connection is alive?

kleptophobiac

Supreme [H]ardness
Joined
Sep 24, 2001
Messages
7,839
I have two if statements in a bash script doing the exact same thing, just grepping for a different port. They are completely identical. One works, the other doesn't. 1234 works, 8080 doesn't. I just don't get it.

Could somebody show me what a "proper" statement would be? I'm looking for ssh connections on 8080 and 1234.
 
dammit, I keep forgetting to put a space between if and [.

Does it every time. Why don't I sleep enough??!?
 
Back
Top