You all come across these from time to time and whats the odds its because of a typo and not a missing page.
But whats worse is it could be in more than one file which means you have to drag your way through them all and find the offending link and then fix it.
So a solution was begging to be found/ created and here is one
Code:
perl -p -i -e 's/<bad_link>/<good_link>/g' `grep -rI <bad_link> * | awk -F : '{print $1 }' | sort | uniq | xargs`
So ok it needs NIX to work its magic but hey its not my fault if you dont use it.
Hope its usefull for any of you's that need it.
Ibbo
|