bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using grep inside 2 levels of directory


From: Venkatesan Jeevanandam
Subject: using grep inside 2 levels of directory
Date: Thu, 22 May 2008 04:49:13 -0700 (PDT)

Hi all,

I have to grep for "text" inside a directory for files "*.soc".

lets say,
my directory structure,
$pwd 
/home/venkat/project/
$ls
arch1/
arch2/
arch3/
arch4/
$cd arch1;ls
core1/
core2/
core3/
core4/
$cd core1;ls
56601.soc
56602.soc
56603.soc

I want to search for "text" using grep command for all *.soc files in all
"arch*/core*" folders.
I tried like this, but it doesnt help me.

$pwd
/home/venkat/project
$grep */*/*soc (not working)

I want to grep in files like, using one command.
arch1/core1/*.soc
arch1/core2/*soc
arch1/core3/*soc
arch2/core1/*soc

Please help me.

Regards,
Venkat

-- 
View this message in context: 
http://www.nabble.com/using-grep-inside-2-levels-of-directory-tp17402549p17402549.html
Sent from the Gnu - Grep mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]