I have a web app that simply returns an IP address. I want to pass that IP result to another batch script that fires off an application that's supposed to connect to that IP address.Here's my test:curl http://silvo.uk.to/IPReg.dll/GetIP | bash starttelem2.shFor testing, starttelem2.sh only contains:#!/bin/shecho THE IP IS  $1However, when I call the above curl with pipe I get what appears to be the curl download progress.How can I simply pass the result of the curl call to my bash script?
How to pass curl result as parameter
shell script;curl
As you have used positional parameter (argument) 1 ($1) inside the script, use command substitution to pass the IP address from curl as the first argument:bash starttelem2.sh $(curl -s http://silvo.uk.to/IPReg.dll/GetIP)$(curl -s http://silvo.uk.to/IPReg.dll/GetIP) is command substitution, which will be replaced by the standard output of the curl command inside.The -s option causes curl to not show any progress info on STDERR.Note that, you have used the shebang as sh but running the script as an argument to bash, as bash is a superset of sh, you should consider making the shebang as bash too, if you don't have any specific reason not to.