Re: [問題] shell的小問題

看板Programming作者 (真人)時間18年前 (2006/11/11 07:39), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/12 (看更多)
※ 引述《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
文章代碼(AID): #15LGsyLF (Programming)
討論串 (同標題文章)
文章代碼(AID): #15LGsyLF (Programming)