自动下载图片的脚本
很多年前,自己写的,自己的文件丢失了,神奇的网络让我又找到了
#!/bin/bash#Description: # download national geographic photo of the day and set it as background# wait for network connection to be established[[ -n $1 ]] && sleep $1resolution=$(xrandr |grep -o 'current [^,]*'|tr -d " "|sed 's:current::')rss=`wget -q -O - http://feeds.nationalgeographic.com/ng/photography/photo-of-the-day/`img_url=$(echo $rss|grep -o "http://[^\"]*exposure[^\"]*"|head -1)img_url=$(echo $img_url|sed "s:360x270:$resolution:")img=/tmp/pod.jpgwget -q -O $img $img_urlcp /tmp/pod.jpg ~/BackGround/`date +%Y%m%d`.jpgcp /tmp/pod.jpg ~/BackGround/today.jpg
             人就像是被蒙着眼推磨的驴子,生活就像一条鞭子;当鞭子抽到你背上时,你就只能一直往前走,虽然连你也不知道要走到什么时候为止,便一直这么坚持着。
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号