Link-Check Script

This commit is contained in:
T
2026-02-09 17:21:18 +01:00
parent 7f3b323242
commit 1e2802c309

View File

@@ -103,3 +103,11 @@ gpg --no-armor --export "$MAILADRESSE" > $(gpg --with-wkd-hash --fingerprint "$M
```
4. Füge es zum git hinzu, commite und pushe.
## Link-Check
```sh
find _posts -mindepth 2 -type f -name 20\* -exec grep -hoP 'https?://[^])# ]+' {} + | sed s+/$++g | sort -u | while read -r link; do
status=$(curl -I "$link" | head -1 | grep -oP 'HTTP\S* \K\d+')
printf "%s\t%s\n" "$status" "$link"
done | tee link_status.txt
```