composed command as timeout parameter in bash -


i can use timeout as:

timeout 5s sleep 6s 

but how can pass timeout more complex command? i've tried following gives me error:

timeout 5s sleep 6s && echo "you did not fit in timeout" timeout 5s 'sleep 6s && echo "you did not fit in timeout"' timeout 5s {sleep 6s && echo "you did not fit in timeout"} timeout 5s (sleep 6s && echo "you did not fit in timeout") 

have @ this:

$ timeout 5 sleep 2 && echo ok || echo "you did not fit in timeout" ok $ timeout 1 sleep 2 && echo ok || echo "you did not fit in timeout" did not fit in timeout 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -