\curl ... | bash ... what's the slash for?

bash, shell

Solution

This is used to call the "original" command, avoiding it to be called with the possible aliases. That is, disables the possible aliases on the command `curl` and adjusts to the original one.

If you have

alias grep='grep --color=auto'

and then you do `grep`, it will have colours. So if you do not want colours, you would just write `\grep`.

Problem

looking at the magic installers which appear for all types of projects (e.g. for rvm) you'll always see commands like: ``` \curl ... | bash ``` e.g. ``` \curl -L https://get.rvm.io | bash -s stable ``` And I was wondering why these commands start with a slash - they seem to run fine without it. Any suggestions?

Original source

Related problems