linux下在頭文件中找宏的定義方法

#!/bin/bash
#處理參數
if(($#<2))
then
 echo "usage: findkey.sh src_dir key"
 exit -1
fi

src_dir=$1
key=$2

find $src_dir  -name "*.h" 2>/dev/null | while read file
do
 if  grep $key $file >&/dev/null
 then
  echo :$file
 fi
done

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章