wget css

#1.get the file

wget -r -l 2 http://abc.com/index.html

#2.find the jpg url from csssed -n 's/.*url(\(.*\)).*/\1/p' style.css > temp.txt

#3.write the wget jpg csssed 's/.*\/\(image.*\)/wget http\:\/\/abc.com\/\1/' temp.txt

-----------------

下载整个网站:

D:\workspace\tui>wget --header='User-Agent:Mozilla' -E -r -k -p http://tui.tenpay.com/w/doku.php

--header添加header

-E: 添加html后缀,如a.php->a.php.html

-r:递归

-k:替换为本地连接

-p:下载图片资源

---------------------

D:\workspace\tui\curl>curl -A "User-Agent:Mozilla"  http://tui.tenpay.com/w/doku.php -O

---------------------

删除文件空格:TAB键没法删除

sed '/^[:blank:]*$/d' ManagerPerformanceBO.java > temp.java

cattemp.java>ManagerPerformanceBO.java

相关推荐