bash scripts收集

Posted realplay

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了bash scripts收集相关的知识,希望对你有一定的参考价值。

只保留代码中的头文件声明

#! /bin/sh  
echo "leave only INCluding declaration in c files"  
find $1 -name "*.c" -exec echo ">>> processing" {} ; -exec sed -i ‘  
#fetch lines without leading #include  
/^s*#s*includes/b  
#b代表分支跳转,如果不代label,则代表跳转到脚本结尾(即直接返回)
/.*$/d  
#delete this lines
‘ {} ;
 
找出一个文件中所有的函数名
grep -E ‘^w*([a-zA-Z0-9_]+ +)+([a-zA-Z0-9_]+) ?(‘ lxFwd_Fwd.c 

 







以上是关于bash scripts收集的主要内容,如果未能解决你的问题,请参考以下文章