問一個shell語法 - Linux

Table of Contents


請教一下,
我現在有一個需求,
就是要去搜尋某個資料夾內(含子資料夾)某個檔名的檔案
再把這些檔案當作 grep 的輸入,
找出含某個特定字樣的檔案

0. cd myproject

1. find . -name Android.mk

2. grep "core" {output from 1}

P.S. use bash

請問一下這樣要怎麼寫,可以一行完成嗎?

Thanks a lot !!

--

All Comments

Blanche avatarBlanche2010-10-15
0. ; 1 | 2 這樣?
Ursula avatarUrsula2010-10-16
0; 2 $(1)
Jessica avatarJessica2010-10-20
cd xx; grep core $(find .....xxxxx)