Last active
May 25, 2021 16:47
-
-
Save brianpursley/229291b6f9aadd78e6120275b57fec87 to your computer and use it in GitHub Desktop.
Test all kubernetes.io links found in source code to determine which ones are broken
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -orihEI "(https?:\/\/kubernetes.io/[-a-zA-Z0-9@:%._\+~#=>?/]*[-a-zA-Z0-9@:%_\+~#=>?])" * | sort | uniq -u | xargs -I % bash -c 'if wget --spider % 2>/dev/null; then echo "[OK] %"; else echo "[MISSING] %"; fi' > /tmp/output.txt | |
cat /tmp/output.txt | grep "\[MISSING\]" | cut -d " " -f2 | xargs -I % grep -riI % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment