I am trying to automate stuff which includes installing rust through
curl https://sh.rustup.rs -sSf | sh
This is interactive and queries for user-input to choose from i.e. "1" "2" or "3".
Not able to figure out, how to input.
Normally for apt-get, "-y" option try to capture and input for prompt.
Not sure, how it is done for curl.
How can I do this?
To make the installation unatended you can run
curl https://sh.rustup.rs -sSf | sh -s -- -y
If you are ssh'd you should add the nohup parameter in front
With the -s
parameter, you set sh to read commands from the standard input, and then you pass the -y
to auto accept the options
For more info about sh you can see the man pages
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