Home How to timeout within a bash script?
Reply: 0

How to timeout within a bash script?

user528 Published in June 18, 2018, 8:47 pm

Possible Duplicate:
Timeout a command in bash without unnecessary delay

So this is what I am trying to do -

for test in `ls Tests`; do

for file in `ls FileFolder`; do

output=`python devcap $test $file`

echo $test $file $output >>result.txt



How do I timeout the $output if it takes longer than say 5 seconds and move to the next $file?

Can I redirect the stderr to result.txt as well?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.319628 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO