List all files with sum of matching word | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


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 !!

List all files with sum of matching word

UNIX for Dummies Questions & Answers


Tags
grep -c

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-13-2013
avihaimar avihaimar is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 26 April 2013, 2:41 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
List all files with sum of matching word


Code:
grep -c 'avihai' 1.log

will give me count of 'avihai' in log

I want to have a list of files in the folder that show file name with count side by side.

Please advice

Last edited by Scott; 01-13-2013 at 07:42 AM.. Reason: Code tags
Sponsored Links
    #2  
Old 01-13-2013
Scrutinizer's Avatar
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 26 October 2014, 2:36 AM EDT
Location: Amsterdam
Posts: 9,549
Thanks: 286
Thanked 2,428 Times in 2,175 Posts
Have you tried

Code:
grep -c avaihai *.log

Sponsored Links
    #3  
Old 01-13-2013
avihaimar avihaimar is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 26 April 2013, 2:41 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
You are right!

Thank you
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
list files not matching wild card lijjumathew Shell Programming and Scripting 4 07-31-2012 06:09 PM
Script to list non matching files using pattern meenavin UNIX for Dummies Questions & Answers 7 11-17-2011 07:39 AM
calculate sum size of files by date (arg list too long) beginningDBA Solaris 2 08-04-2010 10:45 PM
Delete all files if another files in the same directory has a matching occurence of a specific word premier_de Shell Programming and Scripting 2 11-20-2009 04:48 AM
sum of all matching rows using awk i.scientist UNIX for Dummies Questions & Answers 8 08-06-2008 08:13 PM



All times are GMT -4. The time now is 03:44 AM.