title: Keep a file open forever within a bash script
body: <p>I need a way to make a process keep a certain file open forever.  Here's an example of what I have so far:</p>
  
  <p><code>sleep 1000 &gt; myfile &amp;</code></p>
  
  <p>It works for a thousand seconds, but really don't want to make some complicated sleep/loop statement. <a href="https://stackoverflow.com/questions/2935183/bash-infinite-sleep">This post</a> suggested that <code>cat</code> is the same thing as <code>sleep</code> for infinite.  So I tried this:</p>
  
  <p><code>cat &gt; myfile &amp;</code></p>
  
  <p>It almost looks like a mistake doesn't it?  It seemed to work from the command line, but in a script the file connection did not stay open.  Any other ideas?</p>