The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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
grep a string from 2 text files karthikn7974 Shell Programming and Scripting 15 04-24-2008 04:15 AM
How do I rename a bunch of files at once? bbbngowc UNIX for Dummies Questions & Answers 8 04-21-2008 10:23 AM
Renaming a bunch of files Prashanth.m Shell Programming and Scripting 2 09-21-2005 02:16 AM
text files, ASCII files, binary files and ftp transfers Perderabo Answers to Frequently Asked Questions 0 04-08-2004 05:25 PM
grep multiple text files in folder into 1 text file? coppertone UNIX for Dummies Questions & Answers 7 08-23-2002 03:50 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-19-2000
kitykity kitykity is offline
Registered User
  
 

Join Date: Sep 2000
Posts: 3
Unhappy

I have, say, a dozen files, and I want to grep for a string of text within them. I don't remember the exact syntax, but let me give it a shot and show you an idea here...
find . -type f -exec grep thisword {} \;
...and there's a way to put more than one grep into the statement, so it will tell you the file name too... anyone want to help me tackle this one? I used to have it written down, but of course I lost the piece of paper... :..(
- Suz
  #2 (permalink)  
Old 09-19-2000
kitykity kitykity is offline
Registered User
  
 

Join Date: Sep 2000
Posts: 3
Got it figured out...

Duh, that took me all of about 2 minutes to figure out...
find . -type f -exec grep -l word {} \; -exec grep word {} \; -exec echo \;
...and all the echo at the end does is put a space between the results to make them clear... *sigh*
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0