先看两篇博文,作为基础知识.如果对C/C++编译链接过程都了解的话,可以跳过不看. http://www.firedragonpzy.com.cn/index.php/archives/2556 http://www.cppblog.com/shifan3/archive/2007/01/05/17325.html 一. 编译不同目录下的多个文件 各个文件的布局如下: head.h文件的代码: #ifndef HEAD_H #define HEAD_H int add(int a, int
脚本内容如下: #!/bin/bash function delete_file { days=$[$-] for i in `find $dir -type f -ctime +$days` do rm -rf $i done } while read line do dir=`echo $line |awk '{print $1}'` days=`echo $line |awk '{print $2}'` delete_file $dir $days done < file.txt 其中,函