title: Pass file variables from a python script to a bash script
body: <p>I am having a problem getting my python variable (1 file) to pass to my bash script. The python program pulls the file (csv file) and assigns it to var1 and then passes it to the bash script. The bash script uploads it to a server.  The bash script works, but when I try to pass a file variable from python to bash, it does not work. It looks like the variable is empty and I get only the file name being loaded into the server, not the data. All the files are located in the same folder (upload.py, upload_files.sh, data_file.csv) I am new to this, so any help much appreciated.</p>
  <h2>python script</h2>
  <pre><code>import subprocess
  
  var1 = &quot;data_file.csv&quot;
  subprocess.call([&quot;bash&quot;, &quot;upload_files.sh&quot;, var1])
  </code></pre>
  <h2>BASH Script (partial bash script with changed info)</h2>
  <pre><code>    #!bin/bash
      #
      export HOST=example_server.com
       export DATA_FILE=$1
      #
      curl -X PUT -L --header &quot;Content-Type: text/csv&quot; --data-binary@${DATA_FILE} &quot;https://${HOST}:21/sserver/api/v3/fs/server-1/bulk_upload/${DATA_FILE}&quot;
  </code></pre>
  <pre><code>     
  </code></pre>