I wrote a bash script that should be installable from the web. It should take inputs from the user when run. Below is how I did it but it directly terminates the application without prompting the user to input information.
curl www.test.com/script.sh | bash
I read somewhere that stdin is piped to bash that's why it's not prompting anything.
Any help would be great.
Thanks guys
Use process substitution:
bash <(curl www.test.com/script.sh)
You could try:
bash -c "$(curl -s www.test.com/script.sh)"
From the bash manpage,
-c string If the -c option is present, then commands are read from string.
If there are arguments after the string, they are
assigned to the positional parameters, starting with $0.
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