5

How to exit a shell script if a unix command does not return any value for 10 seconds?

view full story
linux-howto

http://www.unix.com – Hi, Can anyone help me how to exit a shell script if a unix command inside does not return any value for 10 seconds? The scenarios is like this. I want to login to a application using shell script where the connection string is mentioned.but suppose this connection string is not responding means after passing the password it is getting hanged, not getting into that application.In this case i want the connection string to wait for sometime say 10 seconds and after that exit the shell program. Any idea how to do this?:wall: (HowTos)