This doesn't do exactly what you want but comes close in a simple way. I just mention it as an f.y.i. as to another approach:
Gives output like:
Doesn't give the counts like you want. You could get some statistics like this though:
Outputs:
Quote:
45 PROT_STATE_CHANGE
45 SOCKET_CLOSE_OK
This User Gave Thanks to grepeverything For This Post:
Hi,
I am trying to do an ldapsearch with a filter that checks the uid and the userpassword:
$filter= "(&(uid=$user) (userpassword=$password)";
$objs = $ldap->search( base => $basedn, filter => "($filter)");
i based it on this example i found on CPAN:
$mesg = $ldap->search(
... (2 Replies)
Hi
I have a file whose sample contents are shown here,
1.2.3.4->2.4.2.4 a(10) b(20) c(30)
1.2.3.4->2.9.2.4 a(10) c(20)
2.3.4.3->3.6.3.2 b(40) d(50) c(20)
2.3.4.3->3.9.0.2 a(40) e(50) c(20)
1.2.3.4->3.4.2.4 a(10) c(30)
6.2.3.4->2.4.2.5 c(10)
.
.
.
.
Here I need to search... (5 Replies)
Hello,
I have two files in this form that consist of three columns, a name (L*contig*), the length (length=**) and the sequence
LT_file.txt
LTcontig1 length=13 acccatgctttta
LTcontig5 length=8 ggattacc
LTcontig8 length=20 ccattgaccgtacctgatcg
LTcontig23 length=5 accta
and... (5 Replies)
Hi All,
I have to search for patterns from a pattern file in a file and mark the matching lines.
Input File:
Student1 60 30
Student2 71 91
Student3 88 98
Pattern file:
Student1 Fail
Student2 Pass
Student2 Pass
Desired output:
Student1 60 30 Fail
Student2 71 91 Pass (5 Replies)
Hi,
I have an XML file with around 1 billion rows in it and i am trying to find the number of times a particular tag occurs in it. The solution i am using works but takes a lot of time (~1 hr) .Please help me with an efficient way to do this.
Lets say the input file is
<Root>
... (13 Replies)
I want to print from <fruits> to </fruits> tag which have <fruit> as mango. Also i want both <fruits> and </fruits> in output. Please help
eg.
<fruits>
<fruit id="111">mango<fruit>
.
another 20 lines
.
</fruits> (3 Replies)
I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help
File:
<xml><object1>house</object1><object2>child</object2>... (9 Replies)
Hi All,
I am working with a XML file.
Below is part for the file.
<Emp:Profile>
<Emp:Description>Admin</Emp:Description>
<Emp:Id>12347</Emp:Id>
</Emp:Profile>
<Emp:Profile>
... (7 Replies)
Hi All,
I'm new to sed.
In following XML file
<interface type='direct'>
<mac address='52:54:00:86:ce:f6'/>
<source dev='eno1' mode='bridge'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
... (8 Replies)
Discussion started by: varunrapelly
8 Replies
LEARN ABOUT REDHAT
bzgrep
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)