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

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -