Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (13 sloc) 390 Bytes
# Collect all dead links in a file
find . -name \*.md -exec markdown-link-check {} \; 2>/dev/null | egrep "[✖]" > broken.txt
# Count the number of lines, extract only that number
n_broken=$(wc broken.txt --lines | cut -f 1 -d " ")
if [[ $n_broken > 0 ]]
echo "Number of broken files: "$n_broken
cat broken.txt
rm broken.txt
exit $n_broken
rm broken.txt
You can’t perform that action at this time.