File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ :
2+
3+ tmp=/tmp/$$ _
4+ trap " rm ${tmp} ; exit 0" 0 1 2 15
5+
6+ PAGE=0
7+
8+ while true
9+ do
10+ cli4 --raw per_page=5 page=${PAGE} /zones > ${tmp}
11+
12+ domains=` jq -c ' .|.result|.[]|.name' < ${tmp} | tr -d ' "' `
13+ result_info=` jq -c ' .|.result_info' < ${tmp} `
14+
15+ COUNT=` echo " ${result_info} " | jq .count`
16+ PAGE=` echo " ${result_info} " | jq .page`
17+ PER_PAGE=` echo " ${result_info} " | jq .per_page`
18+ TOTAL_COUNT=` echo " ${result_info} " | jq .total_count`
19+ TOTAL_PAGES=` echo " ${result_info} " | jq .total_pages`
20+
21+ echo COUNT=${COUNT} PAGE=${PAGE} PER_PAGE=${PER_PAGE} TOTAL_COUNT=${TOTAL_COUNT} TOTAL_PAGES=${TOTAL_PAGES} -- ${domains}
22+
23+ if [ " ${PAGE} " == " ${TOTAL_PAGES} " ]
24+ then
25+ # # last section
26+ break
27+ fi
28+
29+ # grab the next page
30+ PAGE=` expr ${PAGE} + 1`
31+ done
32+
You can’t perform that action at this time.
0 commit comments