less_retarded_wiki/most_wanted.sh

15 lines
287 B
Bash
Raw Normal View History

2024-01-07 03:16:15 +01:00
#!/bin/sh
cat ./*.md | sed -n 's/.*\[.*\](\([^\)\(]*\)).*/\1/p' | sort | uniq -c | sort -nr | sed -n "s/.* \([^ ]\)/\1/p" > tmp.txt
rm tmp2.txt
touch tmp2.txt
while read -r line; do
if ! [ -f $line ]; then
echo "$line" >> tmp2.txt
fi
done < tmp.txt
cat tmp2.txt | head -n 20