alok kumar
alok kumar

Reputation: 67

How to substitute values in the URL

I have a POST request URL using which I want to trigger it multiple machine. But substitution of $SERVER and $PORT not working. Please help.

SERVER='x.y.z.p'
PORT='1234'

API='http://"$SERVER":"$PORT"/Service/'
echo $API

Upvotes: 0

Views: 186

Answers (1)

Mathieu Gasciolli
Mathieu Gasciolli

Reputation: 138

Try API='http://'$SERVER':'$PORT'/Service/'

or API="http://$SERVER:$PORT/Service/"

and put the echo command the line under...

Upvotes: 2

Related Questions