- curl http://sexy.faceks.com/sitemap.xml
- PAGES=`grep -E '<loc>(.*?)</loc>' sitemap.xml |sed '1d'|sed 's/<loc>//'| sed 's,</loc>,,'`
- for page in $PAGES;
- do
- IMAGES=`curl $page|grep "bigimgsrc=" |sed 's/^.*bigimgsrc="//'|sed 's/">//'|tr -d '\\r'`
- for image in $IMAGES;
- do
- echo $image|xargs curl -O &
- done
- done
- #该片段来自于http://www.codesnippet.cn/detail/2301201511614.html
来源: http://www.codesnippet.cn/detail/2301201511614.html