title: Calling python script on MAC/Linux from Command line - passing arguments
body: <p>Consider this setup and folder structure:</p>
  
  <pre><code>c:\foo
        \bin\foo.bat
        \lib\foo.py
  </code></pre>
  
  <p>I have foo.bat path added to my environment PATH, so I can call it from anywhere passing in some arguments:</p>
  
  <pre><code>c:/&gt;foo.bat -v 
  </code></pre>
  
  <p>foo.bat contains this code:</p>
  
  <pre><code>@ECHO OFF
  "c:\foo\lib\foo.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
  </code></pre>
  
  <p>This works fine in Windows.</p>
  
  <p>Now I want to be able to do the same in Mac or Linux.</p>
  
  <p>How can I create this executable file, that will call the script lib\foo.py, passing in some arguments?</p>
  
  <p>thanks</p>
  
  <p><strong>[SOLUTION]</strong></p>
  
  <p>thanks guys, your answers helped me end up with this script that works as intended:</p>
  
  <p>in \foo\bin\foo <em>file</em></p>
  
  <pre><code>#!/usr/bin/env bash
  python /usr/local/foo/lib/foo.py $*
  </code></pre>