script for telnet

view story

http://www.linuxquestions.org – I want to create script wherein it will check the application if its running. The command that I'll be using to check the application is telnet (if you can recommend others, that's ok). I've an application and it is listening to port 1808. If I do telnet localhost 1808, the response is : Code: [root@test ~]# telnet localhost 1808 Trying telnet: connect to address Connection refused What I want to happen is if the response is like to code above, it will execute a commands. Obviously, above code knows that the application is not working (HowTos)