You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
360 B
19 lines
360 B
#!/usr/bin/env bash
|
|
day=0
|
|
function daysago(){
|
|
day=$(date -d "$date -$1 days" +"%Y-%m-%d")
|
|
}
|
|
|
|
i=0
|
|
while [ $day != "1989-04-16" ]
|
|
do
|
|
daysago $i
|
|
echo $day
|
|
if [ ! -f ./imgs/$day.png ]
|
|
then
|
|
curl -sS https://dilbert.com/strip/$day|grep 'assets.amuniversal.com'|grep 'og:image'|cut -f 4 -d '"'|xargs curl -sS -o ./imgs/$day.png
|
|
fi
|
|
|
|
i=$(($i+1))
|
|
done
|