Hi,
I want to grep one file for a search string and get the next 10 lines after the search string.
for eg,in file tnsnames.ora,i have 100 entries.i want to search for one string and get the entry for that db.
please help how to acheive this using awk or sed?
Thanks. (11 Replies)
i have a file like
<fruits>
<red>redcolor<\red>
<banana>yellow color and it is<\banana>
</fruits>
i want to search for a word in a file data between the tags
i mean searching should be done in redcolcor, yellow color and it is (2 Replies)
Hi all,
I have a folder with many files. I need to get all the filenames with the value "<f id=audio-time>*:*:*</f>" word.
* may be any integer.
I used find . -type f -exec grep -H '<f id=audio-time>.:.</f>' {} \;
command to get.
but i am not able to find the correct values.
Any... (2 Replies)
Hi
Pretty sure this is very simple hence im banging my head o the wall as to why i cant get this to work:
Im greping against many files where there will be the following string:
Date: Thu, Aug 23 2001 09:27 PM
(of course values such as date ,time and PM/AM will vary.)
Im trying to grep... (1 Reply)
Hi
I am in new in unix,can any one tell how to grep the data by limit.
suppose I have below data:-
is :mSecs
is :mSecs
is :mSecs
is :mSecs
requirement is how to grep the data which is having count greater than 1000 msecs only.
thanks in adnavce. (2 Replies)
hi,
i got files delimited by |^ character. eg.
apple|^ball|^cat|^dog|^egg
i need to find if the above file contains | (pipe ) character inside the data.eg.
apple|^ball|^cat|^d|og|^egg.
above file contains | character in the dog data. how can i search that. (4 Replies)
Hi All,
I'm using aix flavour unix where im trying for the below kind of pattern to search in all the files in a directory.
I tried with different possible combinations like
grep -ir "out.*\transaction_ctry_code" * etc....
Pattern I'm trying for :
out<any thing>country_cd
Here i... (0 Replies)
I have a huge log file close to 3GB in size.
My task is to generate some reporting based on # of times something is being logged.
I need to find the number of time StringA , StringB , StringC is being called separately.
What I am doing right now is:
grep "StringA" server.log | wc -l... (4 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
LEARN ABOUT LINUX
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)