title: "< <(command-here)" shell idiom resulting in "redirection unexpected"
body: <p>This command works fine:</p>
  
  <pre><code>$ bash -s stable &lt; &lt;(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
  </code></pre>
  
  <p>However, I don't understand how exactly <code>stable</code> is passed as a parameter to the shell script that is downloaded by curl. That's the reason why I fail to achieve the same functionality from within my own shell script - it gives me <code>./foo.sh: 2: Syntax error: redirection unexpected</code>:</p>
  
  <pre><code>$ cat foo.sh 
  #!/bin/sh
  bash -s stable &lt; &lt;(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
  </code></pre>
  
  <p>So, the questions are: how exactly this <code>stable</code> param gets to the script, why are there two redirects in this command, and how do I change this command to make it work inside my script?</p>