Chinaunix首页 | 论坛 | 博客
  • 博客访问: 164377
  • 博文数量: 25
  • 博客积分: 2446
  • 博客等级: 大尉
  • 技术积分: 258
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-18 21:19
文章分类

全部博文(25)

文章存档

2011年(1)

2010年(20)

2009年(4)

分类:

2010-01-11 00:50:19

#!/bin/bash
#a small colorful shell script for download pictures
#2010-1-11 made by yifan
temp=/var/temp
urlfile=/var/temp1
if [ !f /var/temp1 ]
then
touch /var/temp1
fi
echo -e "\33[32m"
echo "input a .html type url page which contains jpg"
echo -e "\33[30m"
read webpage
curl $webpage >$temp
sed -i 's/http:/\nhttp:/g;s/\.jpg/\.jpg\n/g' $temp
sed -n '/^http.*jpg$/p' $temp >$urlfile
echo -e "\33[34m"
echo -e "\tstarting to download pictures,please wait!"
for pic in `cat $urlfile`
do
wget $pic
done
echo -e "\tpictures have been put into $PWD"
echo -e "\33[30m"
rm -f $temp $urlfile
阅读(1337) | 评论(0) | 转发(0) |
0

上一篇:策略路由

下一篇:深入理解静态路由

给主人留下些什么吧!~~