title: How to pipe multiple sql- and py-scripts
body: <p>I have the following code copied from <a href="https://github.com/cbick/gtfs_SQL_importer" rel="nofollow noreferrer">github gtfs_SQL_importer</a>:</p>
  <pre><code>cat gtfs_tables.sql \
    &lt;(python import_gtfs_to_sql.py path/to/gtfs/data/directory) \
    gtfs_tables_makeindexes.sql \
    vacuumer.sql \
    | psql mydbname
  </code></pre>
  <p>I tried to run this on windows and replaced the call to the UNIX-command <code>cat</code> by the windows equivalent <code>type</code> which should work similar as of <a href="https://stackoverflow.com/questions/60244/is-there-replacement-for-cat-on-windows">is-there-replacement-for-cat-on-windows</a>.</p>
  <p>However when I execute that code I get some error:</p>
  <blockquote>
  <p>The syntax for the filename, directory or filesystem is wrong.</p>
  </blockquote>
  <p>So I tried to limit the number of piped files to only combine the call to python and the call to <code>psql</code>:</p>
  <pre><code>type &lt;(C:/python27/python path/to/py-script.py path/to/file-argument) | psql -U myUser -d myDatabase
  </code></pre>
  <p>which results in the same error.</p>
  <p>However when I execute the python-script alone it works as expected:</p>
  <pre><code>C:/python27/python path/to/py-script.py path/to/file-argument
  </code></pre>
  <p>So I assume the error results from using <code>type</code> in order to pipe the result of the script directly to <code>psql</code>.</p>
  <p>Does anyone know the correct syntax?</p>
  <p>EDIT: To ensure the problem is not related to a file not being found I used absolute paths for all arguments within my command except the <code>type</code> and the <code>psql</code>-command (which are both handled via the <code>%PATH%</code>-variable).</p>