Show Navigation
Conversation
Notices
-
comparing variables in bash is ok, but it seems like bash is deciding total is not an int. variables in bash are not typed, but total only has numerals.
I can test simple math outside of the loop on $total and it doesn't work.
I was using a variable name that made sense, but all the examples use i, so I just went with that.
#/bin/bash
total=`./total.sh | awk '{ print $2 }'`
echo $total
i=0
#testing another method
while [ $i < $total ]
do
curl -X POST https://sandbox.plaid.com/institutions/get -H 'Content-Type: application/json' --data @<(cat <<EOF
{
"client_id": "5cc312cee54277001312d232",
"secret": "",
"count": 1,
"offset": $i
}
EOF
)
echo $i
((i++))
done