glorfindel-SE-Userscripts/404/404.sh
2018-07-24 14:01:12 +02:00

9 lines
No EOL
268 B
Bash
Executable file

#!/bin/bash
regex="https:\\/\\/([a-z]+)\\.stackexchange\\.com\\/"
while read p; do
if [[ $p =~ $regex ]]
then
name="${BASH_REMATCH[1]}"
curl "https://cdn.sstatic.net/Sites/$name/img/404.png" -o "$name.404.png"
fi
done < ~/Dropbox/stack-exchange-sites.txt