title: Bash recursive function using while loop
body: <p>I have a function called func1. When passed an argument it will generate a list of items. I need each of these items to be passed as argument to func1 and so on until there is no more to pass. Ex.</p>
  <pre><code>func1 &lt;arg&gt;  | while read item
  do
     func1 item | while read item1
     do
       func1 item1 &lt;--- how to do this recursion?
     done
  done
  </code></pre>
  <p>Just need some implementation ideas. Thank you</p>