Created
March 30, 2020 19:04
This file contains 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
#!/bin/bash | |
sudo apt-get install python pip wget | |
pip install jq xq | |
wget -rl1 https://echanges.dila.gouv.fr/OPENDATA/CASS/ | |
find -iname '*.tar.gz' | xargs tar xvzf | |
nxml=`find -iname '*.xml'| wc -l`;(find -iname '*.xml' | xargs -n 1 -P 6 -I {} bash -c 'file={};cat $file | xq "." > ${file/xml/json}' &) && while(true);do find -iname '*.json' | wc -l | awk -v nxml=$nxml '{printf "\rconversion xml>json en cours : " $1 "/" nxml}';sleep 1;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment