Hi,

from your GIT Bash mention I assume that you are  running on Windows. 
Are you sure jenkins is using your git bash as shell, and not either 
another bash or powershell?

Or is it even running on a different host, where  may some programms 
(curl/sed) are not available?
Try running just curl to see the output before trying to catch the result.


Björn
Am Dienstag, 14. Januar 2020 05:43:38 UTC+1 schrieb phanindra m:
>
> Hi,
>
> I'm Trying to Run Rest API in Jenkins Job, but facing few issues. 
>
> below command will fetch the session id of an application and stores it in 
> a var variable. this command is working fine in GIT Bash, but when i trying 
> to run this command in Execute Shell option in jenkins it is not working.  
> So can any one help me on this.
>
> var=$(curl --silent 'http://URL/Login?sUserId=UserID&sPassword=password' 
> | sed -nr 's/.*>(.*)<.*/\1/p')
> echo $var
>
> Thanks In Advance,
>
> Phani
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ae7358ee-7325-498e-829a-71d15597b1dc%40googlegroups.com.

Reply via email to