The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: For loop
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-14-2008
Hidalgo Hidalgo is offline
Registered User
 

Join Date: May 2008
Posts: 1
Question For loop

Hi all,

I hope some one can help me.

I have a file with a list of user names ( 1 column )

I need to check a log file for these names and how many times they occur and send the output to a new file.

I was thinking of a for loop.

My hopless attempt so far is.

For co in $( cat “file name “ )
Do
Grep ${co} /location/location/location/”log”


Regards Hidalgo
Reply With Quote
Forum Sponsor