Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

zfgrep(1) [netbsd man page]

ZGREP(1)						    BSD General Commands Manual 						  ZGREP(1)

zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files SYNOPSIS
zgrep [grep-flags] [--] pattern [files ...] zegrep [grep-flags] [--] pattern [file ...] zfgrep [grep-flags] [--] pattern [file ...] DESCRIPTION
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1). The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern argument. zegrep calls egrep(1), while zfgrep calls fgrep(1). EXIT STATUS
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0. SEE ALSO
egrep(1), fgrep(1), grep(1), gzip(1), zcat(1) AUTHORS
Thomas Klausner <> BSD
December 28, 2003 BSD
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find station from where is logged in

for secure access purposes I want to know where somebody logs in working in K shell I have who am i= giving user and terminal =gxb pts/4 Jan 22 15:0 finger user => gives all sessions of user = Login name: gxb Directory: /home/gxb ... (17 Replies)
Discussion started by: ghislain
17 Replies

2. Shell Programming and Scripting

Substitute File name

Hi all I am in a small problem pl help me out. I am having a directory having ZIP files with name starting as : 02.pqr and so on I want to run the script- cat myfile | awk '{print $1, $2}' | while read var1 var2 do zcat $var2* | grep "^000$var1" >> my_output done Where the... (22 Replies)
Discussion started by: vanand420
22 Replies

3. Shell Programming and Scripting

Looping on a list of files...

This isn't working for multiple files. It works for one file though. exists1=$(ls | grep gspp*) for FILES in $exists1 do echo "Loading $exists1" ... (23 Replies)
Discussion started by: lazerfoursix
23 Replies

4. UNIX for Dummies Questions & Answers

grep using regexp

I have 2 files called stuff-egress-filter and stuff-ingress filter. There are also files called something like stuff-egress-F/0 I want to match the first two... I tried (i realize there is no filename... I'm piping this from the ls command) grep stuff-*-filter Finds nothing. If I... (18 Replies)
Discussion started by: earnstaf
18 Replies

5. Shell Programming and Scripting

Search for a pattern

I want to write a command to search in a list of files, the files that contain a pattern for a number of times between Min and Max But I don't know how to do it. Can anyone give me advice? (26 Replies)
Discussion started by: DNAx86
26 Replies

6. Shell Programming and Scripting

probem while grep

Hi , I used the floowing command in my script. grep 'swi' file.txt | grep '^DEV' | cut -f 6 >> f.txt Here file.txt contains fields of records. My intension is to grep for the 3 letter 'swi' in one of filed, this field will contain swi as part of word. And next grep is to grep for a 'DEV'... (18 Replies)
Discussion started by: pradeep_script
18 Replies

7. Shell Programming and Scripting

grep for a particular pattern and remove few lines above top and bottom of the patter

grep for a particular pattern and remove 5 lines above the pattern and 6 lines below the pattern root@server1 # cat filename Shell Programming and Scripting test1 Shell Programminsada asda dasd asd Shell Programming and Scripting Post New Thread Shell Programming and S sadsa ... (17 Replies)
Discussion started by: fed.linuxgossip
17 Replies

8. UNIX for Dummies Questions & Answers

determine pid from ps -ef | grep something

Hi all, i have a script called and within it calls when i do a ps -ef | grep, i get two sets of number user_test 4225 3250 0 10:31 pts/1 00:00:00 when i do a ps -ef | grep, i get two sets of number user_test 4269 4225 22 10:31 pts/1 00:00:45... (17 Replies)
Discussion started by: new2ss
17 Replies

9. Shell Programming and Scripting

Error in if statement

I am working on script for stale nfs. the file consists of cat data01stale.log - - - - /abcd/backup - - - - /abcd/data Script (16 Replies)
Discussion started by: nareshkumar522
16 Replies

10. Shell Programming and Scripting

Comparing two files and printing 2nd column if match found

Hi guys, I'm rather new at using UNIX based systems, and when it comes to scripting etc I'm even newer. I have two files which i need to compare. file1: (some random ID's) 451245 451288 136588 784522 file2: (random ID's + e-mail assigned to ID) 123888 451245 ... (21 Replies)
Discussion started by: spirm8
21 Replies

11. UNIX for Dummies Questions & Answers

grep pipe filename print issue

uname -a SunOS mypc 5.10 Generic_141414-07 sun4v sparc SUNW,SPARC-Enterprise-T2000 uname -a SunOS mypc 5.10 Generic_144488-07 sun4v sparc SUNW,SPARC-Enterprise-T5220 find . -name "*.cer" -exec keytool -v -list -printcert -file {} \; | grep -i "Aug 03" Valid from: Mon Jan 29 00:00:00 GMT... (16 Replies)
Discussion started by: shifahim
16 Replies

12. Shell Programming and Scripting

Can someone please help me optimize my code (script searches subdirectories)?

Here is my code. What it does is it reads an input file (input.txt which contains roughly 2,000 search phrases) and searches a directory for files that contains the search phrase. The directory contains roughly 1900 files and 84 subdirectories. The output is a file (output.txt) that shows only the... (23 Replies)
Discussion started by: jl487
23 Replies

13. Shell Programming and Scripting

Using grep and a parameter file to return unique values

Hello Everyone! I have updated the first post so that my intentions are easier to understand, and also attached sample files (post #18). I have over 500 text files in a directory. Over 1 GB of data. The data in those files is organised in lines: My intention is to return one line per... (23 Replies)
Discussion started by: clippertm
23 Replies

14. Shell Programming and Scripting

Question about awk

Hi, I am printing the children of a process using this command: ps -aef | grep 13783 | grep -v grep | grep -v ps | grep -v $0 and it shows the children correctly. (2 in my case) The thing is that when I pipe it to awk to get the PIDs like this: ps -aef | grep 13783 | grep -v grep |... (19 Replies)
Discussion started by: backslashV
19 Replies

15. Shell Programming and Scripting

Using grep with test and without using [[ ]]

As an exercise, I'm trying to re-write this code without the compound square brackets, using grep and test. Need to know what to do about the "equal-tilde". #!/bin/bash # test-integer2: evaluate the value of an integer. INT=-5 if +$ ]]; then if ; then echo "INT is zero." else if ; then... (17 Replies)
Discussion started by: Xubuntu56
17 Replies