Bash - Wait with timeout <p>I have a problem with bash programming. I have this code:</p> <pre><code>#!/bin/bash tmpfile="temp.txt" ./child.sh &amp; sleep 4s </code></pre> <p>but I want to get the exit code of <code>child.sh</code>. I know that is possible with the costructor <code>wait</code>. There are any constructor with wait+timeout?</p> <p>Thanks</p>