awesome-hacker-search-engines/scripts/check-dups.sh
2023-04-12 12:15:59 +02:00

15 lines
303 B
Bash
Executable File

#!/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