glorfindel-SE-Userscripts/404/404.sh

9 lines
268 B
Bash
Raw Normal View History

2018-07-24 12:01:12 +00:00
#!/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