Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7655529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:32:03+00:00 2026-05-31T12:32:03+00:00

This command works fine: $ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) However, I

  • 0

This command works fine:

$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

However, I don’t understand how exactly stable 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 ./foo.sh: 2: Syntax error: redirection unexpected:

$ cat foo.sh 
#!/bin/sh
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

So, the questions are: how exactly this stable 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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:32:05+00:00Added an answer on May 31, 2026 at 12:32 pm

    Regarding the “redirection unexpected” error:

    That’s not related to stable, it’s related to your script using /bin/sh, not bash. The <() syntax is unavailable in POSIX shells, which includes bash when invoked as /bin/sh (in which case it turns off nonstandard functionality for compatibility reasons).

    Make your shebang line #!/bin/bash.

    Understanding the < <() idiom:

    To be clear about what’s going on — <() is replaced with a filename which refers to the output of the command which it runs; on Linux, this is typically a /dev/fd/## type filename. Running < <(command), then, is taking that file and directing it to your stdin… which is pretty close the behavior of a pipe.

    To understand why this idiom is useful, compare this:

    read foo < <(echo "bar")
    echo "$foo"
    

    to this:

    echo "bar" | read foo
    echo "$foo"
    

    The former works, because the read is executed by the same shell that later echoes the result. The latter does not, because the read is run in a subshell that was created just to set up the pipeline and then destroyed, so the variable is no longer present for the subsequent echo.

    Understanding bash -s stable:

    bash -s indicates that the script to run will come in on stdin. All arguments, then, are fed to the script in the $@ array ($1, $2, etc), so stable becomes $1 when the script fed in on stdin is run.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am construcing a command in bash dynamically. This works fine: COMMAND=java myclass ${COMMAND}
This sql command works fine in sqlitemanager but in my android application this don't
My problem can be summed up by making this simple command works : nice
Has anyone seen this: ?? No jgem command works at all?? Though jruby -S
if I paste this into the command prompt by hand, it works, but if
why doesn't this work on a bash command line: cat `echo 'filename with spaces'`
I can't figure out why this simple update command won't work: private void button1_Click(object
I'm having a problem with the SetLength command. It's basically this problem: I work
This command and output: % find . -name file.xml 2> /dev/null ./a/d/file.xml % So
This command will produce 1 extra line at the top and 3 more at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.