11 lines
339 B
Bash
Executable File
11 lines
339 B
Bash
Executable File
#!/bin/bash
|
|
|
|
json=`curl 'https://wiki.linux-forks.de/mediawiki/api.php?action=query&format=json&list=categorymembers&cmtitle=Category:City&cmlimit=100'`
|
|
cities=`echo "$json" | json_reformat | sed -n 's/.*"title":\s*"\([^"]*\).*/\1/p' | tr ' ' '_' | tr '\n' ' '`
|
|
|
|
echo "["
|
|
for city in $cities; do
|
|
./fetch_single.sh "$city"
|
|
done
|
|
echo "{}]"
|