Created
March 17, 2022 15:50
-
-
Save ThomasG77/edaa46d0ee945829befb88a9e719f0e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare -a depts=(01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29 2A 2B 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 971 972 973 974 976) | |
true >| stats_api_pro_bio.txt | |
for i in "${depts[@]}" | |
do | |
url="https://back.agencebio.org/api/gouv/operateurs/?departements=$i"; | |
tot=$(curl -X 'GET' "$url" -H 'accept: application/json' | jq -r '.nbTotal'); | |
echo "${i};${tot}" >> stats_api_pro_bio.txt; | |
done | |
cut -d ';' -f2 stats_api_pro_bio.txt | paste -s -d+ | bc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01;750 | |
02;459 | |
03;633 | |
04;900 | |
05;712 | |
06;1021 | |
07;1573 | |
08;382 | |
09;958 | |
10;504 | |
11;1935 | |
12;1480 | |
13;2495 | |
14;1044 | |
15;538 | |
16;749 | |
17;1049 | |
18;576 | |
19;647 | |
21;1315 | |
22;1682 | |
23;401 | |
24;1896 | |
25;567 | |
26;2524 | |
27;534 | |
28;413 | |
29;1970 | |
2A;310 | |
2B;556 | |
30;2336 | |
31;1926 | |
32;2490 | |
33;3063 | |
34;2482 | |
35;1929 | |
36;415 | |
37;951 | |
38;1647 | |
39;728 | |
40;876 | |
41;506 | |
42;1068 | |
43;809 | |
44;2380 | |
45;580 | |
46;896 | |
47;1636 | |
48;570 | |
49;2004 | |
50;1078 | |
51;1015 | |
52;351 | |
53;832 | |
54;607 | |
55;353 | |
56;1676 | |
57;664 | |
58;431 | |
59;1387 | |
60;516 | |
61;724 | |
62;899 | |
63;989 | |
64;1461 | |
65;572 | |
66;1618 | |
67;1264 | |
68;1101 | |
69;1886 | |
70;519 | |
71;950 | |
72;788 | |
73;641 | |
74;825 | |
75;1621 | |
76;812 | |
77;737 | |
78;662 | |
79;1001 | |
80;480 | |
81;1207 | |
82;1082 | |
83;1723 | |
84;2192 | |
85;1466 | |
86;862 | |
87;766 | |
88;583 | |
89;835 | |
90;63 | |
91;585 | |
92;841 | |
93;328 | |
94;679 | |
95;293 | |
971;331 | |
972;208 | |
973;155 | |
974;784 | |
976;22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment