1 #!/bin/bash2 for i in `grep CPU_ZERO ./ -nrw | awk -F: '{print $1}'`3 do4 echo $i5 head -20 $i | grep "#include"6 echo " "7 8 done
如果还想统计头文件出现的次数,则:
./inc.sh | grep "" | wc -w
本文共 257 字,大约阅读时间需要 1 分钟。
1 #!/bin/bash2 for i in `grep CPU_ZERO ./ -nrw | awk -F: '{print $1}'`3 do4 echo $i5 head -20 $i | grep "#include"6 echo " "7 8 done
如果还想统计头文件出现的次数,则:
./inc.sh | grep "" | wc -w
转载于:https://www.cnblogs.com/xxg1992/p/7388112.html