How to loop a curl command with different variables from input file

Home / Uncategorized / How to loop a curl command with different variables from input file

Question:
Kind of new to bash scripting and now I’m stuck.

I need to curl with these variables:"{ "nodename": "$1", "ipaddress": "$2", "poolname": "$3", "port": "$4", "loadbalancer" : "$5" }"

and my input_file.txt contains the 5 variables:server001 10.10.10.01 serverpool1 80 loadbalancer01
server002 10.10.10.02 serverpool1 80 loadbalancer01
server003 10.10.10.03 serverpool1 80 loadbalancer01

Can’t figure out how to "insert" the variables from the input_file.txt to the curl


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *