Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    That worked, thanks. though the ;fi seems unnecessary. Commented Aug 18, 2016 at 12:48
  • 1
    You may prefer timeout 5s command ; if [ $? -eq 124 ] ; then echo timed out ; else echo did not time out ; fi (I think Ipor started with this and forgot to remove the ;fi :) ) Commented Aug 18, 2016 at 12:50
  • Thanks, That's much more of a complete answer that I needed. Just a small doubt, this is echoed in stdout right? how do it do it in stderr? Commented Aug 18, 2016 at 13:03
  • Nevermind, I got it Commented Aug 18, 2016 at 13:15