Issue
I'm trying to execute a bin script directly from a remote repository using either wget
or curl
. However when I run wget -O - https://raw.githubusercontent.com/matriarx/typescript/main/bin/init | bash
or curl -L https://raw.githubusercontent.com/matriarx/typescript/main/bin/init | bash
it immediately closes off the script and exits it.
Inside that script I'm using a read
command to get user input, but it never ends up reading the input and just exits the script before ever completing it.
How can I use the wget
or curl
commands to get the file, pipe it to bash and keep it running and open and fully complete the script before exiting.
Solution
Try, with curl
,
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/matriarx/typescript/main/bin/init | sh
Answered By - BlackBeans Answer Checked By - Clifford M. (WPSolving Volunteer)