Skip to content

Instantly share code, notes, and snippets.

@aborruso
Created September 7, 2025 16:21
Show Gist options
  • Select an option

  • Save aborruso/40e013fd618ab38b08ce56b5f0eb7abb to your computer and use it in GitHub Desktop.

Select an option

Save aborruso/40e013fd618ab38b08ce56b5f0eb7abb to your computer and use it in GitHub Desktop.
zip_regione_vettoriale_catasto.sh
REG="VALLE-AOSTA.zip"
echo "${REG}"
# ciclo sulle province
bsdtar -tf "$REG" | grep -Ei '\.zip$' | while read -r PROVZIP; do
echo "│ ├─ $PROVZIP"
# ciclo sui comuni dentro la provincia
bsdtar -xOf "$REG" "$PROVZIP" | bsdtar -tf - | grep -Ei '\.zip$' | while read -r COMZIP; do
echo "│ │ ├─ $COMZIP"
# ciclo sui file GML dentro il comune
bsdtar -xOf "$REG" "$PROVZIP" \
| bsdtar -xOf - "$COMZIP" \
| bsdtar -tf - \
| grep -Ei '\.gml$' \
| awk '{print "│ │ │ ├─ " $0}'
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment