title: pass bash script args as named parameters to a command inside the script
body: <p>I have a bash script that takes two parameters. Inside that script, I need to call ssh using a heredoc and call a method that expects the two arguments. For example:</p>
  
  <pre><code>ssh -o "IdentitiesOnly=yes" -t -i $key -l user localhost &lt;&lt; 'ENDSSH'
  /my_python_app.py -u -t tar -p $1 -f $2
  ENDSSH
  </code></pre>
  
  <p>key is set by my script, I know that part is good.</p>
  
  <p>However, my_python_app prints out args and it doesn't show any arguments for -p and -f</p>
  
  <p>I would call my script like</p>
  
  <pre><code>my_script /tmp filename
  </code></pre>
  
  <p>I use argparse in my python app, but I am also printing out sys.argv and it gives me:</p>
  
  <pre><code>['my_python_app.py', '-u', '-t', 'tar', '-p', '-f']
  </code></pre>
  
  <p>Note there are no values received for -p and -f. (-u is a flag, and that is set correctly).</p>
  
  <p>How do I pass $1 and $2 to my_python_app as the -p and -f values?</p>