Re: [問題] shell的小問題
※ 引述《journeyman@kkcity.com.tw (㊣人笨是沒有藥醫的*)》之銘言:
: ※ 引述《indept.bbs@ptt.cc (真人)》之銘言:
: 我會寫
: cat *.c | grep $1
: 仔細點
: for f in *.c
: do
: echo :in $f:
: cat $f | grep $1
: done
: 不然誰知道哪一行是在哪一個檔案裡面。
:
也許我沒講清楚, 我希望在 *.c 中找到 'static int' 之類的東西,
您的程式如果寫成 go.sh, 當執行
$go.sh static int
$go.sh static
會得到相同的結果, 並非我所要的
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 171.64.92.108
討論串 (同標題文章)
Programming 近期熱門文章
PTT數位生活區 即時熱門文章