Reputation: 1483
In a tutorial on how to set up virtual box i came across the following line
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash
I got curious on what the "| bash" part means, but i can't find it on google and its driving me nuts. Most likely this is a very n00b question, but I would appreciate if someone could give me an explanation.
Upvotes: 2
Views: 1647
Reputation: 2391
The |
or pipe operator will redirect the output of the previous command (curl
in this case) to bash
, i.e. the shell.
bash
itself will execute it.
So whatever the website returns will be executed as a shell script.
This is nowadays typical for installers, but you should be aware of the source (website) and content the URL provides, because it may harm your system.
More on the pipeline: http://www.gnu.org/software/bash/manual/html_node/Pipelines.html
Upvotes: 2