💾 Archived View for lyk.so › systems › food › scripts › scraping-foodista › flatten-html-cache.sh captured on 2024-09-29 at 00:41:48.
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
#!/usr/bin/env sh set -e find "$1" -type f | while read f; do tmp="$(echo "$f" | rev | cut -d/ -f-2 | rev)" new="$(echo "$tmp" | cut -d/ -f2)-$(echo "$tmp" | cut -d/ -f1)" mv "$f" "$1/$new" rmdir "$(dirname "$f")" done