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
how to grep word from .gz files & .z files udaya_subbu Shell Programming and Scripting 8 08-08-2008 05:53 AM
listing files along with grep -v charlie11k UNIX for Dummies Questions & Answers 5 06-01-2007 07:00 AM
modifying grep to get files only within last 2 hrs ragha81 Shell Programming and Scripting 3 01-11-2007 07:11 PM
grep data from files getdpg Shell Programming and Scripting 2 01-17-2006 12:57 PM
Script to grep several files sqloyd Shell Programming and Scripting 4 05-05-2005 04:25 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-16-2007
koho koho is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 2
Arrow grep from .z files

There are archived files with .Z in the server.
I want to grep a code within those files.
How can I do this?

Please help.


Koho
  #2 (permalink)  
Old 11-16-2007
koho koho is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 2
There are archived files with .Z in the server.
I want to grep a code within those files.
How can I do this?

Please help.


Koho
  #3 (permalink)  
Old 11-16-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,932
you can try with zgrep
  #4 (permalink)  
Old 11-16-2007
user_prady user_prady is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 163
Quote:
Originally Posted by koho View Post
There are archived files with .Z in the server.
I want to grep a code within those files.
How can I do this?

Please help.


Koho
Something like this..
Code:
PATH = /<your path>
for temp in `find $PATH  -name '*.z'`
do
   grep 'your string' $temp
done
  #5 (permalink)  
Old 11-16-2007
prowla prowla is offline
Read Only
  
 

Join Date: Nov 2007
Posts: 165
zcat myfile.Z | grep
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 02:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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