title: How to use timeout command with a own function?
body: <p>I would like to use the timeout command with an own function, e.g.:</p>
  
  <pre><code>#!/bin/bash
  function test { sleep 10; echo "done" }
  
  timeout 5 test
  </code></pre>
  
  <p>But when calling this script, it seems to do nothing. The shell returns right after I started it.</p>
  
  <p>Is there a way to fix this or can timeout not be used on own functions ?</p>