I have to run this command to install NPM. What does it do? What is the | at the end?
curl https://raw.githubusercontent.com/creationix/nvm/v0.23.2/install.sh | bash
Also, am I running UNIX-like commands in Bash? Why does this work? Is it that Bash is a UNIX-command compatible interface for the terminal?
In bash (and most *nix shells) the |
(pipe) symbol takes the output from one command and uses it as the input for the next command.
What you are doing here is using curl to retrieve the install.sh file and then output its contents into bash, which is a shell that will execute the contents of install.sh
In short, you are downloading and running the install.sh script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With