broken-link-checker
broken-link-checker copied to clipboard
[Feature] Only List Broken Links
Feature: Have an option to only list broken links
Currently, it appears the command will list all links and which ones are broken and which are ok
When searching very large websites, it can be difficult to see which ones are broken.
As a bit of a workaround (assuming you don't have the name BROKEN in any of your file names, you could just grep for them like so:
blc website -ro | grep BROKEN | tee broken.txt
The tee command writes them to a file called broken.txt and also displays them to stdout.
If you do have file names that don't match, you could probably come up with some more sophisticated regex.
@davisdude thanks for the suggestion, but I'm afraid in our case that doesn't help either as I also need to know on which page the broken link can be found :)
I agree this enhancement would be helpful. In the meantime this is my workaround:
blc $WEBSITE -ro 2>&1|grep -iEB1 "[^0].broken"