linux - Loop through api call in bash script -



linux - Loop through api call in bash script -

i have api returns 50 users.

is there way of looping through api call

expand=users%5b1%3a50%5d

the 1 after b starting number , pull until 50 number after a

i have script store responses text file how can loop through adding increments of 50?

for example. having variable in place of numbers

expand=users%5b$num1%3a$num2%5d

expand=users%5b{1..50}%3a50%5d

the {1..5} expand 1 2 3 4 5

for illustration

$ echo abc{1..5}def abc1def abc2def abc3def abc4def abc5def

now need loop on expand

for api in $expand #do done

linux bash shell

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -