![]() |
|
|
|
|
|||||||
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. Shell Script Page. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| while loop inside while loop | panknil | Shell Programming and Scripting | 0 | 01-07-2008 08:49 AM |
| For loop | xramm | HP-UX | 3 | 10-10-2007 11:20 AM |
| While Loop | hemangjani | Shell Programming and Scripting | 2 | 11-02-2006 07:01 AM |
| for loop | munnabhai1 | Shell Programming and Scripting | 3 | 04-06-2006 11:30 AM |
| how to get the similar function in while loop or for loop | trynew | Shell Programming and Scripting | 3 | 06-17-2002 08:09 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
|||
|
Add a "done" at the end to restore hope; and check your capitalization. Also you probably want grep -c to count the number of occurrences, and proper quoting to wrap it up.
|
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|