Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wget and run/remove bash script in one line

Tags:

bash

shell

wget

wget http://sitehere.com/install.sh -v -O install.sh; rm -rf install.sh

That runs the script after download right and then removes it?

like image 876
amanada.williams Avatar asked Oct 08 '12 18:10

amanada.williams


People also ask

How do I break out of a bash script?

There are many methods to quit the bash script, i.e., quit while writing a bash script, while execution, or at run time. One of the many known methods to exit a bash script while writing is the simple shortcut key, i.e., “Ctrl+X”. While at run time, you can exit the code using “Ctrl+Z”.

How do I get out of bash in terminal?

To exit from bash type exit and press ENTER . If your shell prompt is > you may have typed ' or " , to specify a string, as part of a shell command but have not typed another ' or " to close the string. To interrupt the current command press CTRL-C .


1 Answers

I like to pipe it into sh. No need to create and remove file locally.

wget http://sitehere.com/install.sh -O - | sh

like image 85
helderco Avatar answered Oct 31 '22 13:10

helderco