寻觅生命中的那一片浅草......

每日存档 四月 17th, 2009

“不许联想”mp3歌曲简单抓取脚本

vi wgetmp3

添加以下内容:
wget http://www.wangxiaofeng.net/mp3player.xml
grep http mp3player.xml | cut -d” -f2 | sed ‘s/^/wget /’ > mp3.list.sh
mkdir mp3
cd mp3
sh ../mp3.list.sh

保存退出

sh wgetmp3

脚本讲解
第一行,下载xml文件
第二行,用grep过滤出含有http的内容,重定向给cut,-d指定分隔符为”,将”转义,避免shell解析它,-f选取区域,这里选择第二个部分,重定向给sed,在每一行的开头添加wget和一个空格,重定向到mp3.list.sh
第三行,创建mp3目录
第四行,进入
mp3目录
第五行,执行上级目录的mp3.list.sh
开始下载

表哥博客最近的歌曲列表没更新,可惜!!

感谢这篇文章:http://blog.youxu.info/2007/04/10/cool-linux-1/

grep http mp3player.xml | cut -d” -f2 | sed ‘s/^/wget /’ > mp3.list.sh

这一句好像要改成,也就是加了个转义字符

grep http mp3player.xml | cut -d\” -f2 | sed ‘s/^/wget /’ > mp3.list.sh

CentOS5.2如何显示中文

安装时选择英文了,为显示中文,执行以下命令

yum -y install Deployment_Guide-zh-TW Deployment_Guide-zh-CN fonts-chinese

2009年四月
« 3月   5月 »
 12345
6789101112
13141516171819
20212223242526
27282930