The UNIX and Linux Forums  

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


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Greping from zipped files without unzipping kanu_kanu Shell Programming and Scripting 3 03-05-2008 07:01 AM
Search and Parse string from inside a File SSims UNIX for Dummies Questions & Answers 2 11-08-2007 12:50 PM
reading a zipped file without unzipping it? marwan UNIX for Dummies Questions & Answers 1 03-29-2007 02:59 PM
Search a file for pattern? davjoyce UNIX for Dummies Questions & Answers 2 03-07-2006 03:07 PM
Search file for pattern and grab some lines before pattern frustrated1 Shell Programming and Scripting 2 12-22-2005 12:41 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-26-2006
Registered User
 

Join Date: Apr 2006
Posts: 1
How to search a pattern inside a zipped file ie (.gz file) with out unzipping it

How to search a pattern inside a zipped file ie (.gz file) with out unzipping it?
using grep command..

Bit urgent.. pls..help me
Reply With Quote
Forum Sponsor
  #2  
Old 04-26-2006
Registered User
 

Join Date: Dec 2005
Location: India
Posts: 218
Hi ,

use the following

Quote:
gunzip -c file.gz | grep <pattern>
Gaurav
Reply With Quote
  #3  
Old 04-26-2006
Registered User
 

Join Date: Oct 2005
Location: Mumbai,India
Posts: 58
Thumbs up

hi
does that apply for a file like "<file name>.tar.gz"?

regards
abhijeet
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0