title: Call a function using nohup
body: <p>I am trying to call a function using <code>nohup</code> like this:</p>
  
  <pre><code>function1(){
      while true 
      do
          echo "function1"
          sleep 1
      done
  }
  
  nohup function1 &amp; 
  # ...... some other code
  </code></pre>
  
  <p>but may be the function isn't seen by <code>nohup</code> and I get this error:</p>
  
  <pre><code>nohup: failed to run command `function1' : No such file or dictionary
  </code></pre>
  
  <p>I don't want to create new sh file for my function. How can I fix this?</p>