I want to load a specific file through wget, pass it as a bashscript, and in one shot also provide arguments for it.
In my case, the script is stored at: https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh
I tried:
wget -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh | bash
but it ends with:
Error: you need to provide a host and port to test.
Usage:
bash host:port [-s] [-t timeout] [-- command args]
-h HOST | --host=HOST Host or IP under test
-p PORT | --port=PORT TCP port under test
Alternatively, you specify the host and port as host:port
-s | --strict Only execute subcommand if the test succeeds
-q | --quiet Don't output any status messages
-t TIMEOUT | --timeout=TIMEOUT
Timeout in seconds, zero for no timeout
-- COMMAND ARGS Execute command with args after the test finishes
since I also need to pass arguments to this bashscript (host name and port to check my specific case), namely: I need to run something like:
wait-for-it.sh localhost:8181
UPDATE:
I would like the solution to be without local storage (=> pipe to bashonly please)
source
share