#!/bin/bash echo "🧹 Säubere token_log.json-Dateien (nur gültige Zeilen) …" for f in ~/.*/token_log.json; do echo "🔍 $f" cp "$f" "$f.bak" grep -e '^{.*}$' "$f.bak" | while read -r line; do echo "$line" | jq empty >/dev/null 2>&1 && echo "$line" done > "$f.cleaned" mv "$f.cleaned" "$f" echo "✅ Fertig: $f" done