一句话shell
shell用到ANSI控制码汇总下载连续的文件
for num in `seq -w 1 1 21`; do wget http://thns.tsinghua.edu.cn/thnsebooks/ebook73/$num.pdf; done
在当前目录下(排除0618和Mail目录)查找以a开头的文件或目录
find . \( -path './0618*' -o -path './Mail*' \) -a -prune -o -name "a*" -print
在当前目录的c或h文件中查找字符串
find . "*.[ch]" -exec grep -nH "main" {} \;
Ubuntu下列出system-config-printer-gnome包所安装的文件占的空间
du -cxh $(file `dpkg -L system-config-printer-gnome`|grep -v directory|awk -F: '{print $1}')

2008年8月29日 13:13
不需要用到seq的,直接for ((num=1;num<21;num++));do ...;done 就可以了。
2008年8月29日 14:01
seq -w 1 1 21 可生成等宽的序列
2008年9月01日 09:52
哈,这个好。