Oneliners with wget - 02
if [ `date +"%w"` -lt 6 ] && \ [ $((`date +"%w"` % 2)) = 1 ]; then wget http://www.goats.com/comix/`date \ +"%y%m"`/goats`date +"%y%m%d"`.png; else echo no goats today; fi;
date +"%w" returns the day of the week (from 1 to 7)
- On April, 2nd 2004 it works, downloading
Slideshow ^ |< << Slide 13 of 40 >> >| |