Bash: Terminate on Timeout/File Overflow while Executing Command

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-04-13T03:43:45Z Indexed on 2010/04/13 4:02 UTC
Read the original article Hit count: 476

Filed under:
|
|
|
|

I'm writing a mock-grading script in bash. It's supposed to execute a C program which will give some output (which I redirect to a file.) I'm trying to (1) make it timeout after a certain duration and also (2) terminate if the output file reaches a certain file size limit. Not sure how to go about either of these. Any help? Thanks.

© Stack Overflow or respective owner

Related posts about bash

Related posts about shell