#!/bin/bash # Cuantifica el problema de los alias que llevan '?' literal dentro de la URL set -uo pipefail BASE=/home/rafa/joomla-migration/mirror-antiguo RUN=$(cat "$BASE/CURRENT_RUN") D=$BASE/runs/$RUN echo "=== URLs del inventario con '?' literal ===" grep -c '?' "$BASE/inventory/urls-input.txt" echo "=== muestra ===" grep '?' "$BASE/inventory/urls-input.txt" | head -5 echo echo "=== assets-input con '?' ===" grep -c '?' "$D/assets-input.txt" echo "=== assets-input SIN '?' (assets de verdad) ===" grep -vc '?' "$D/assets-input.txt" echo echo "=== ficheros en raw sin extension ===" find "$D/raw" -type f ! -name '*.*' | wc -l echo "=== ficheros en raw con '?' en el nombre ===" find "$D/raw" -type f -name '*[?]*' | wc -l echo "=== muestra ===" find "$D/raw" -type f -name '*[?]*' | head -3 echo echo "=== items K2 con '?' en el alias (BD) ===" grep -c 'buscadoravanzado' "$BASE/inventory/urls-k2.txt"