0

I have a variable named "event_id" that represents an event number. I want to run the script with a change of this variable from number 1 to number 65000. This means that the script will run in cycles and each time the variable "event_id" will increase the number by 1 until it reaches 65000.

event_id="1"
curl -k -u api:1234 https://localhost 'search=index=test eventid='$event_id''

Please your help

OmZ
  • 31
  • 1
  • 7

1 Answers1

0

Just put it in a loop

for ((i = 1 ; i < 65001 ; i++)); do
    curl -k -u api:1234 https://localhost "search=index=test eventid='${i}'"
done
michjnich
  • 2,796
  • 3
  • 15
  • 31