The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 10:01 AM
Search and Parse string from inside a File SSims UNIX for Dummies Questions & Answers 2 11-08-2007 03:50 PM
reading a zipped file without unzipping it? marwan UNIX for Dummies Questions & Answers 1 03-29-2007 05:59 PM
Search a file for pattern? davjoyce UNIX for Dummies Questions & Answers 2 03-07-2006 06:07 PM
Search file for pattern and grab some lines before pattern frustrated1 Shell Programming and Scripting 2 12-22-2005 03:41 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-26-2006
senraj01 senraj01 is offline
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
  #2 (permalink)  
Old 04-26-2006
gauravgoel gauravgoel is offline
Registered User
  
 

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

use the following

Quote:
gunzip -c file.gz | grep <pattern>
Gaurav
  #3 (permalink)  
Old 04-26-2006
abhijeetkul abhijeetkul is offline
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
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0