1. 程式人生 > >bash scripts收集

bash scripts收集

fin line span exec fetch bash rep ssi ESS

只保留代碼中的頭文件聲明

#! /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*include\s/b
#b代表分支跳轉,如果不代label,則代表跳轉到腳本結尾(即直接返回)
/.*$/d #delete this lines ‘ {} \; 找出一個文件中所有的函數名
grep -E ‘^\w*([a-zA-Z0-9_]+ +)+([a-zA-Z0-9_]+) ?\(‘ lxFwd_Fwd.c

bash scripts收集