Venkatesan Jeevanandam wrote:
> I have to grep for "text" inside a directory for files "*.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 don't see a pattern there.  In which case grep will use the first
expanded filename as the pattern.  Perhaps you meant to use this:

  grep PATTERN */*/*soc

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

I would use find rather than the shell to select the files and then
have find call grep.

  find . -name "*.soc" -exec grep PATTERN {} +

Bob


Reply via email to