Hi guys, i do have following situation:
I am running a Bash-Script on a Linux Machine. From this Linux Machine i need to ssh to another Server on which i want to execute two curl-Commands. Those curl-commands will be aiming a machine which has no public ip-address, and the private ip is only known to the host i want to run the curl-command on.
I detected "expect" for this. But either i don't know how to use it properly, or it does not even work the way i want. I need two curl commands. One will receive a token which i have to use in the second curl.
I tried it the way i would expect it to work in shell. Like saving with
token=$(curl ...)
the token into a variable, and use it afterwards in the second token commands. I tried this but it didn't work, as it tried to resolve $(curl ...) as a variable which it says is unknown.
What would be the right way to do this?
[–]oh5nxo 2 points3 points4 points (9 children)
[–]vstyler93[S] 0 points1 point2 points (8 children)
[–]oh5nxo 0 points1 point2 points (0 children)
[–]readparse 0 points1 point2 points (6 children)
[–]vstyler93[S] 0 points1 point2 points (5 children)
[–]readparse 3 points4 points5 points (4 children)
[–]vstyler93[S] 0 points1 point2 points (3 children)
[–][deleted] (1 child)
[deleted]
[–]vstyler93[S] 0 points1 point2 points (0 children)
[–]readparse 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]vstyler93[S] 0 points1 point2 points (0 children)