I couldn't find the original thread that I created and since I didn't get a definitive answer, I figured I'd try again. Maybe this time I can describe what I want a little better.
I've got two files, each with thousands of names all separated by new line. I want to know if 'name in file1'... (2 Replies)
I have several files (around 50) that have the similar format. I need to extract the 5th line from every file and output that into a text file. So far, I have been able to figure out how to do it for a single file:
$ awk 'NR==5' text1.txt > results.txt
OR
$ sed -n '5p' text1.txt > results.txt... (6 Replies)
I am trying to search for 2 files using the find command as below
find -name file1.txt -a -name file2.txt
It doesn't give a result although the files exist in the folder, however when i try the following
find -name file1.txt -o -name file2.txt
It does give me the result.
./file2.txt... (4 Replies)
hi,
i need my bash script to find regex in xml file.. and comment 2 lines before and after the line that contains regex.. can't use # needs to be <!-- at the beginning and --> and the end of the comment.
so eg..
first block
<filter>
<filter-name>MyRegEx</filter-name>
... (11 Replies)
Hi,
I have several files that look like this:
File1.txt
Data1
Data2
Data20
File2.txt
Data1
Data5
Data10
File3.txt
Data1
Data2
Data17
File4.txt (6 Replies)
Howdy Folks,
I have a list that looks like this:
(file2.txt)
AAA
BBB
CCC
DDD
and there are 24 of these short words.
I am matching these patterns to another file with 755795 lines (file1.txt).
I have this code for matching:
awk -v f2=file2.txt '
BEGIN {
while(... (2 Replies)
Hello,
I am trying to find out the line numbers where regex match and put them into a file with below command:
awk '/'$pat'/ {print NR}' $fileName >> temp.txt
where $pat is the regex
but this command is taking a lot of time to execute with bigger files for size more than 5000000... (8 Replies)
Hi all...
Can somebody pls help me with this...
I have a directory (dir1) which has many subdirectories(vr001,vr002,vr003..) with each subdir containing similar text file(say ras.txt).
I have another directory(dir2) which has again got some subdir(vr001c,vr002c,vr003c..) with each subdir... (0 Replies)
Hi All ,
I have multiple pipe delimited csv files are present in a directory.I need to find out distinct count on a column on those files and need the total distinct
count on all files.
We can't merge all the files here as file size are huge in millions.I have tried in below way for each... (9 Replies)
Discussion started by: STCET22
9 Replies
LEARN ABOUT CENTOS
exigrep
EXIGREP(8) System Manager's Manual EXIGREP(8)NAME
EXIGREP - Search Exim's main log
SYNOPSIS
exigrep [-l] pattern [log file] ...
DESCRIPTION
The exigrep utility is a Perl script that searches one or more main log files for entries that match a given pattern. When it finds a
match, it extracts all the log entries for the relevant message, not just those that match the pattern. Thus, exigrep can extract complete
log entries for a given message, or all mail for a given user, or for a given host, for example.
The -l flag means 'literal', that is, treat all characters in the pattern as standing for themselves. Otherwise the pattern must be a Perl
regular expression. The pattern match is case-insensitive. If no file names are given on the command line, the standard input is read.
If the location of a zcat command is known from the definition of ZCAT_COMMAND in Local/Makefile, exigrep automatically passes any file
whose name ends in COMPRESS_SUFFIX through zcat as it searches it.
BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches
would be greatly appreciated.
SEE ALSO exim(8), perlre(1), /usr/share/doc/exim4-base/
AUTHOR
This manual page was stitched together from spec.txt by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux system
(but may be used by others).
March 26, 2003 EXIGREP(8)