title: How do I pass all command line arguments given to a bash script including string parameters as-is to a child process?
body: <p>The following question is a variation of my problem: </p>
  
  <p><a href="https://stackoverflow.com/q/26067249/1672565">Bash: Reading quoted/escaped arguments correctly from a string</a></p>
  
  <p>I want to write a bash script (say 'something.sh') of the following kind ...</p>
  
  <pre><code>#!/bin/bash
  
  python $*
  </code></pre>
  
  <p>... which passes all command line arguments as they were given to it directly to the child process. The above based on $* works for commands like ...</p>
  
  <pre><code>./something.sh --version
  </code></pre>
  
  <p>... just fine. However, it fails miserably for string arguments like for instance in this case ... </p>
  
  <pre><code>./something.sh -c "import os; print(os.name)"
  </code></pre>
  
  <p>... which results (in my example) in ...</p>
  
  <pre><code>python -c import
  </code></pre>
  
  <p>... cutting the string argument at the first space (naturally producing a Python syntax error). </p>
  
  <p>I am looking for a generic solution, which can handle multiple arguments and string arguments for arbitrary programs called by the bash script. </p>