|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Counting values found in .gz file question
So, just learned the other day to use zgrep 'value' myfile.gz to find a value within the .gz file. Is there a way to count the value rather than printing out every value using zgrep?
|
|
#2
|
|||
|
|||
|
I'm not familiar with zgrep but a simple way would be something like:
Code:
gunzip -dc <filename> | grep -c <string_to_search_for>
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums. |
|
#3
|
|||
|
|||
|
Quote:
Thanks, I was able to use zgrep -c value filename.gz via cygwin. I'll read up more on zgrep. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Counting values found in .gz file question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|