diff --git a/scripts/check-dups.sh b/scripts/check-dups.sh new file mode 100755 index 0000000..2ee4e51 --- /dev/null +++ b/scripts/check-dups.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +readme="README.md" + +links=$(cat $readme | egrep "\- \[" | wc -l) + +uniqlinks=$(cat $readme | egrep "\- \[" | uniq | wc -l) + +if [[ $links -eq $uniqlinks ]]; +then + echo "NO DUPLICATES FOUND." +else + echo "DUPLICATES FOUND!" + cat $readme | egrep "\- \[" | uniq -c | egrep -iv "1 - [" +fi \ No newline at end of file