Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Grep bunch of gzip files to count based on category Post 302554688 by jinxx on Monday 12th of September 2011 04:45:43 PM
Old 09-12-2011
Shell_life, I just forgot to mention there is no header in the file. That was just an example.Can this be represented in the form of column?

Last edited by jinxx; 09-12-2011 at 05:47 PM.. Reason: incorrect info
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep'ing for text within a bunch of files...?

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... (1 Reply)
Discussion started by: kitykity
1 Replies

2. Shell Programming and Scripting

Grep, count and match two files

I am writing the below script to do a grep and count number of occurances between two tab delimited files. I am trying to achieve.. 1) Extract column 2 and column 3 from the S.txt file. Put it in a temp pattern file 2) Grep and count column 2 in D.txt file 3) Compare the counts between... (19 Replies)
Discussion started by: madhunk
19 Replies

3. Shell Programming and Scripting

Count of files based on date?

Hi Friends, Can anyone help me with this: To get the count of files that are existing in a directory created on a perticular date like in the example (01/08) .(having same pattern for the filename) ex: FileName Creted Date FILE001 01/08/2007 FILE005 ... (6 Replies)
Discussion started by: sbasetty
6 Replies

4. UNIX for Advanced & Expert Users

grep count across multiple files

I have a number of simulation log files and I want to get a total count of the "PASSED" expression in them. If I use grep -c <files>, grep would give a tally for each file. I just want one number, the total count. How do I do that? (4 Replies)
Discussion started by: CrunchMunch
4 Replies

5. UNIX for Advanced & Expert Users

How to perform Grep on many Gzip files, Searching for Specific information

Hello, I am wondering if you can assist with my question and ask kindly for this. I have a number of files that are listed as file1.gz through file100.gz. I am trying to perform a grep on the files and find a specific date that only resides within within one of the files. There are... (3 Replies)
Discussion started by: legharb
3 Replies

6. Shell Programming and Scripting

Moving the files based on count and time.

Hi, I have a requirement ,let us say 1000 files needs to be transferred in an hour from one path to another path and if the files (1000 files) are transferred within an hour ( say 40 mins), then the process should remain idle for the remaining time ( 20 mins). (3 Replies)
Discussion started by: Asaikarthik
3 Replies

7. Shell Programming and Scripting

Total count in each category for given file list

I have list of file names in filename.txt below is file format >>File1 _________________________ 01~12345~Y~YES~aaaaa~can 02~23456~N~NO~bbbbb~can . . . 99~23__________________________ Need to find total count from each file depending on specific string and add them to have total count... (17 Replies)
Discussion started by: santoshdrkr
17 Replies

8. Shell Programming and Scripting

Inserting column data based on category assignment

please help with the following. I have 4 col data .. instrument , category, variable and value. the instruments belong to particular categories and they all measure some variables (var1 and var2 in this example), the last column is the value an instrument outputs for a variable. I have used... (0 Replies)
Discussion started by: ritakadm
0 Replies

9. Shell Programming and Scripting

Category and count with awk

I want to categorize and count the as below: Input file: A1 G1 C1 F1 A2 G1 C1 F1 A3 G1 C1 F2 A4 G1 C2 F2 A7 G1 C2 F2 A8 G1 C2 F3 A11 G1 C2 F3 A23 G1 C2 F3 B4 G1 C2 F3 AC4 G2 C3 F4 B6 G2 C4 F4 BB5 G2 C4 F4 A25 G2 C5 F4 B13 G2 C5 F5 D12 G2 C5 F5 D2 G2 C5 F5 (3 Replies)
Discussion started by: aydj
3 Replies

10. Shell Programming and Scripting

Split files based on row delimiter count

I have a huge file (around 4-5 GB containing 20 million rows) which has text like: <EOFD>11<EOFD>22<EORD>2<EOFD>2222<EOFD>3333<EORD>3<EOFD>44<EOFD>55<EORD>66<EOFD>888<EOFD>9999<EORD> Actually above is an extracted file from a Sql Server with each field delimited by <EOFD> and each row ends... (8 Replies)
Discussion started by: amvip
8 Replies
XZGREP(1)							     XZ Utils								 XZGREP(1)

NAME
xzgrep - search compressed files for a regular expression SYNOPSIS
xzgrep [grep_options] [-e] pattern file... xzegrep ... xzfgrep ... lzgrep ... lzegrep ... lzfgrep ... DESCRIPTION
xzgrep invokes grep(1) on files which may be either uncompressed or compressed with xz(1), lzma(1), gzip(1), bzip2(1), or lzop(1). All options specified are passed directly to grep(1). If no file is specified, then standard input is decompressed if necessary and fed to grep(1). When reading from standard input, gzip(1), bzip2(1), and lzop(1) compressed files are not supported. If xzgrep is invoked as xzegrep or xzfgrep then egrep(1) or fgrep(1) is used instead of grep(1). The same applies to names lzgrep, lze- grep, and lzfgrep, which are provided for backward compatibility with LZMA Utils. ENVIRONMENT
GREP If the GREP environment variable is set, xzgrep uses it instead of grep(1), egrep(1), or fgrep(1). SEE ALSO
grep(1), xz(1), gzip(1), bzip2(1), lzop(1), zgrep(1) Tukaani 2011-03-19 XZGREP(1)
All times are GMT -4. The time now is 04:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy