#!/bin/bash set -uo pipefail BASE=/home/rafa/joomla-migration/mirror-antiguo RUN=$(cat "$BASE/CURRENT_RUN") DIR=$BASE/runs/$RUN M=$DIR/missing-pages.txt echo "total: $(wc -l < "$M")" echo echo "=== con query string ===" grep -c '?' "$M" echo "=== primer segmento de ruta ===" sed 's#^http://antiguo.feadulta.com/##' "$M" | cut -d/ -f1 | sort | uniq -c | sort -rn | head -20 echo echo "=== segundo segmento bajo /es/ ===" grep '^http://antiguo.feadulta.com/es/' "$M" | sed 's#^http://antiguo.feadulta.com/es/##' | cut -d/ -f1 | sort | uniq -c | sort -rn | head -25 echo echo "=== muestra aleatoria de 25 ===" shuf -n 25 "$M"