Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

bzegrep(1) [opendarwin man page]

BZGREP(1)						      General Commands Manual							 BZGREP(1)

NAME
bzgrep, bzfgrep, bzegrep - search possibly bzip2 compressed files for a regular expression SYNOPSIS
bzgrep [ grep_options ] [ -e ] pattern filename... bzegrep [ egrep_options ] [ -e ] pattern filename... bzfgrep [ fgrep_options ] [ -e ] pattern filename... DESCRIPTION
Bzgrep is used to invoke the grep on bzip2-compressed files. All options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If bzgrep is invoked as bzegrep or bzfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, bzgrep uses it as the grep program to be invoked. For example: for sh: GREP=fgrep bzgrep string files for csh: (setenv GREP fgrep; bzgrep string files) AUTHOR
Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. SEE ALSO
grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1) BZGREP(1)

Check Out this Related Man Page

BZGREP(1)						      General Commands Manual							 BZGREP(1)

NAME
bzgrep, bzfgrep, bzegrep - search possibly bzip2 compressed files for a regular expression SYNOPSIS
bzgrep [ grep_options ] [ -e ] pattern filename... bzegrep [ egrep_options ] [ -e ] pattern filename... bzfgrep [ fgrep_options ] [ -e ] pattern filename... DESCRIPTION
Bzgrep is used to invoke the grep on bzip2-compressed files. All options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If bzgrep is invoked as bzegrep or bzfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, bzgrep uses it as the grep program to be invoked. For example: for sh: GREP=fgrep bzgrep string files for csh: (setenv GREP fgrep; bzgrep string files) AUTHOR
Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. SEE ALSO
grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1) BZGREP(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Losing filename in grep output

I have the following line in a script that searches files in several directories and shows the search results on the screen. ls "$path" | xargs cat | tr -s " " | fgrep -i "$search_arg" But, because I'm also using CAT and TR, the output from the search does not display the name of the file... (6 Replies)
Discussion started by: netguy
6 Replies

2. UNIX for Dummies Questions & Answers

recrusive search in GREP

All, When i use the below command for recrusive search for a pattern it is not working in my macine I am using HP Unix. Please let me know where i am wrong. grep -rs "pattern" i an expecting the same result as find . | xargs grep "pattern" .. Please let me know. Thanks,... (8 Replies)
Discussion started by: arunkumar_mca
8 Replies

3. Shell Programming and Scripting

Extracting pattern only with AWK | SED | GREP

We have the following statement working in CGYWIN, but when we move the program to Solaris 10 it fails. x=`echo "ABC196925XYZ" | grep -o --only-matching "\{6\}"` How can we use AWK or SED to extract only the number from the string? The following outputs the entire string. We only want... (5 Replies)
Discussion started by: James Clark
5 Replies

4. UNIX for Dummies Questions & Answers

How to grep a particular pattern using a variable

Hi all, I am searching for the files with a pattern which is stored in a variable. eg: the day is taken from the date format into a variable "day" I am trying to search with the pattern in that variable. ls -ltr | grep "$day" I am not getting the filtered output. Please help me... (8 Replies)
Discussion started by: ladtony
8 Replies

5. UNIX for Dummies Questions & Answers

get the latest file by reading the date in the filename.

Hi, I grep for a pattern in a list of files. "grep -i -l $pattern *.datx*" it may give me n number of files. say for eg, it gives me 2 files. lock_eicu_20071228_00000000.dat_20071228_05343100 lock_eicu_20080501_00000000.dat_20080501_05343900 out of these 2 files I need to get the... (7 Replies)
Discussion started by: prsshini
7 Replies

6. UNIX for Dummies Questions & Answers

AWK and GREP help

I'm trying to awk two columns and then grep it so i can display the line EX. john smith megan lil thomas phil ohnny jilll i want this to be displayed... john smith ohnny jilll (because ohn is in the first collumn of this database (12 Replies)
Discussion started by: miro
12 Replies

7. Shell Programming and Scripting

how to find a particular string from a set of string output

Hi , I have a line by line output as follows,for example output of ls sample1 sample2 sample i need to check if this output contains the exact string sample.If i use grep , it will find out all strings that contain sample as a part of their word.I dont want to do a pattern matching... (11 Replies)
Discussion started by: padmisri
11 Replies

8. Shell Programming and Scripting

grep a pattern and replace a value in it and write to the same file.

I have some complication with this, I have a file like below for DEV_1 till DEV_10. and the db values are set accordinly which are not unique. For example DEV1,DEV4,DEV6 can have the same target DB name. I waned to identify for DEV_2 and then replace the TARGET_DATABASE value with the new DB... (6 Replies)
Discussion started by: yesmani
6 Replies

9. UNIX for Dummies Questions & Answers

How to get the last field of a string(pattern)?

b= find =/home/root/dir1/*.xml | xargs grep '</XML>' | cut -d ":" -f1 | uniq From a folder that has many files, I am trying to get the filename which has </XML> in it using the above command. But while giving the result, the variable b is showing the path also. Ex:... (5 Replies)
Discussion started by: asmfloyd
5 Replies

10. Shell Programming and Scripting

fgrep command

How can we use fgrep command to search pattern on perticular field on a file. eg : I have a parren file having format cat patternfile SPA16S199982 SPA5S26330 I want to seach these pattern on FIRST field of File2(since other field has same data) and that too maching entirely. ... (10 Replies)
Discussion started by: morbid_angel
10 Replies

11. UNIX for Dummies Questions & Answers

Searching for specific filenames

Hi I would like to know how to search through a directory and pull out files that has a specific pattern in the filename. For example if the filename has "bsc" in it, then that file must be moved to another directory where I will perform some operations on it. I know grep can be used, but I'm... (17 Replies)
Discussion started by: ladyAnne
17 Replies

12. UNIX for Dummies Questions & Answers

To get the total of how many times the pattern is repeated.

Hi, I need the total of how many times the pattern is being repeated in a particular file. I tried with grep as below, but no go. grep -c best sample Contents of Sample file: ----------------------- This is the best site I have never come across. The best one indeed. Very best... (8 Replies)
Discussion started by: venkatesht
8 Replies

13. Shell Programming and Scripting

Shell script help is needed

I have a file test.txt and i need to grep pattern "A.17" from that file. I know cat test.txt | grep A.17 will return the pattern, but it is returing like # VERSION=A.17 How can i take only A.17 from this if A.17 is found, ... do something if not found ... do something Please... (11 Replies)
Discussion started by: Renjesh
11 Replies

14. Shell Programming and Scripting

egrep help required to find pattern

Hi All, Can some one please help me how to grep the comments from "oracle" & "sybase" code. I would like to grep below type of pattern. -- /* */ Please help. (6 Replies)
Discussion started by: gr8_usk
6 Replies

15. Shell Programming and Scripting

Help with ls, grep commands

Oracle Linux 6.4/Bash shell I have six files as shown below. Using ls/grep (or anything) , I need to list all files which start with the pattern stomper but not the ones which ends with 1. $ touch stompera $ touch stomperb $ touch stomperc $ touch stompera1 $ touch stomperb1 $ touch... (7 Replies)
Discussion started by: kraljic
7 Replies