skip to Main Content

This command works perfectly fine when executed on bash.

sh < (curl -sSL https://myurl.com/install.sh)

It’s an install script with some prompts that require y or n answers. Finally it installs a couple of programs, creates a directory, downloads some file and runs some nodejs program.

However, when running on zsh on Ubuntu it spits out:

zsh: number expected

What would be the correct syntax to run this script on zsh, be able to answer the questions inside the script and let it do its thing?

2

Answers


  1. Chosen as BEST ANSWER

    As pointed out by @shellter and @zaidhaan-hussain, the problem was my wrong syntax.

    The code should be

    sh <(curl -sSL https://myurl.com/install.sh)
    

    without space between the < and (. That's the correct syntax for process substitution.


  2. Did you try to do:

    $ bash < (curl -sSL https://myurl.com/install.sh)
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search