Skip to content

Instantly share code, notes, and snippets.

@Realiserad
Created November 2, 2023 18:21
Show Gist options
  • Select an option

  • Save Realiserad/a4b039b400812d1405559ea96e948adf to your computer and use it in GitHub Desktop.

Select an option

Save Realiserad/a4b039b400812d1405559ea96e948adf to your computer and use it in GitHub Desktop.
Try to resolve a list of links extracted using find and grep
@Realiserad
Copy link
Author

One-liner to run it for a quick and dirty check of some markdown files in the current working directory:

curl --silent "https://gist.githubusercontent.com/Realiserad/a4b039b400812d1405559ea96e948adf/raw/535473858915d92b7844ccced6e14181b80e15d2/check_links.py" -o /tmp/check_links.py; find . -name "*.md" -type f -print0 | xargs -0 grep -o "https://[^ )`\"<]*" | python3 /tmp/check_links.py | jq 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment