![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with GREP. | syndex | Shell Programming and Scripting | 2 | 07-11-2007 01:44 PM |
| grep problem | asal_email2 | UNIX for Dummies Questions & Answers | 4 | 06-22-2005 08:49 PM |
| grep problem | svennie | UNIX for Dummies Questions & Answers | 5 | 11-08-2004 04:29 AM |
| Grep Problem | lesstjm | Shell Programming and Scripting | 2 | 10-27-2004 10:13 AM |
| Grep problem | odogbolu98 | Shell Programming and Scripting | 3 | 02-18-2003 03:53 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Grep Problem
Hi,
I want search all files containing some "searchtext" in current dir and sub dir. For this, I used grep "searchtext" */* This will search only in sub dir files and does not give results if file containing search text exists in current directory. and grep "searchtext" * This will search only files current directory, not sub directories. But when I use , following command . I get result. find . | xargs grep "searchtext" It searches at both current dir and sub dir . How to achive this using grep command . thanks |
|
||||
|
find calling command
Quote:
|
|
|||||
|
Quote:
Code:
find . -name 'haystack' -exec grep 'needle' {} \; -print
Vino |
|
|||||
|
Quote:
|
|
|||||
|
Quote:
Just Ice, for learning point of view (atleast for me), how would you approach the OP to suit your statement. Thanks, vino |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|