Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mboxgrep(1) [debian man page]

MBOXGREP(1)						      General Commands Manual						       MBOXGREP(1)

NAME
mboxgrep - displays email messages matching a pattern SYNOPSIS
mboxgrep [OPTIONS] PATTERN [MAILBOX] DESCRIPTION
This manual page refers to mboxgrep version 0.7.9. mboxgrep scans a MAILBOX and displays messages matching PATTERN. If a mailbox name is ommited, or a single dash (-) is given instead, it reads from standard input. It can read mbox folders or output from another mboxgrep process from standard input. mboxgrep understands POSIX regular expressions, as well as Perl compatible regular expressions (if enabled at compile time). MAILBOX can be either a: o mbox folder (either plain or compressed) o MH folder o Gnus nnmh or nnml folder o qmail-style maildir folder OPTIONS
-h, --help Display a help screen and exit. -V, --version Display version and copyright information and exit. -r, --recursive Descend into directories recursively. -E, --extended-regexp PATTERN is an extended regular expression. This is default. -G, --basic-regexp PATTERN is a basic regular expression. -P, --perl-regexp PATTERN is a Perl regular expression. Works only if enabled at compile time. -e, --regexp=PATTERN Use PATTERN as a regular expression. -i, --ignore-case Ignore case distinctions. -v, --invert-match Select messages which don't match PATTERN. -H, --headers Match PATTERN against message headers. -B, --body Match PATTERN against message body. -l, --file-lock=METHOD Select file locking METHOD. METHOD is `fcntl', `flock', or `none'. -nl, --no-file-lock Do not lock files. This option is meaningful only if a mbox folder (see below) is scanned. -c, --count Suppress normal output and print a count of matching messages. -o, --output=FOLDER Suppress normal output and write messages to destination folder FOLDER instead. -p, --pipe=COMMAND Pipe each found message to COMMAND -d, --delete Suppress normal output and delete selected messages instead. Use with caution. -nd, --no-duplicates Ignore duplicate messages. -m, --mailbox-format=TYPE Select input and output mailbox TYPE. TYPE can be either `mbox' (default), `zmbox' (meaning `gzip compressed mbox'), `bz2mbox' (meaning `bzip2 compressed mbox'), `mh', `nnml', `nnmh' or `maildir'. EXAMPLES
o Search $MAIL for messages from Dirty Harry: mboxgrep '^From:.*callahan@homicide.SFPD.gov' $MAIL o Display all messages contained in folder ~/Mail/incoming, except those that appear to originate from AOL: mboxgrep -v 'Received:.*aol.com' ~/Mail/incoming BUGS
Report them to address below. NOTICE
Mboxgrep was alomost completely rewritten since version 0.5.3. Additionally, there was no stable 0.6.x branch between 0.5.3 and 0.7.0. SEE ALSO
grep(1), regex(7), perlre(1), mbox(5), RFC 2822 DEDICATION
Mboxgrep is dedicated in loving memory of Vicky, my cat who died of tumor on Sep 12, 2002. You haven't been long with us, but you gave us a lot of joy and all your big heart that stopped ticking too early. I will never forget you. Sleep well, little friend. URL
http://www.mboxgrep.org/ AUTHOR
Daniel Spiljar <dspiljar@world.std.com> 24 Aug 2003 MBOXGREP(1)

Check Out this Related Man Page

tre-agrep(1)						      General Commands Manual						      tre-agrep(1)

NAME
tre-agrep - print lines approximately matching a pattern SYNOPSIS
tre-agrep [OPTION]... PATTERN [FILE]... DESCRIPTION
Searches for approximate matches of PATTERN in each FILE or standard input. Example: `tre-agrep -2 optimize foo.txt' outputs all lines in file `foo.txt' that match "optimize" within two errors. E.g. lines which contain "optimise", "optmise", and "opitmize" all match. OPTIONS
Regexp selection and interpretation: -e PATTERN, --regexp=PATTERN Use PATTERN as a regular expression; useful to protect patterns beginning with -. -i, --ignore-case Ignore case distinctions (as defined by the current locale) in PATTERN and input files. -k, --literal Treat PATTERN as a literal string, that is, a fixed string with no special characters. -w, --word-regexp Force PATTERN to match only whole words. A "whole word" is a substring which either starts at the beginning or the record or is preceded by a non-word constituent character. Similarly, the substring must either end at the end of the record or be followed by a non-word constituent character. Word-constituent characters are alphanumerics (as defined by the current locale) and the under- score character. Note that the non-word constituent characters must surround the match; they cannot be counted as errors. Approximate matching settings: -D NUM, --delete-cost=NUM Set cost of missing characters to NUM. -I NUM, --insert-cost=NUM Set cost of extra characters to NUM. -S NUM, --substitute-cost=NUM Set cost of incorrect characters to NUM. Note that a deletion (a missing character) and an insertion (an extra character) together constitute a substituted character, but the cost will be the that of a deletion and an insertion added together. Thus, if the const of a substitution is set to be larger than the sum of the costs of deletion and insertion, direct substitutions will never be done. -E NUM, --max-errors=NUM Select records that have at most NUM errors. -# Select records that have at most # errors (# is a digit between 0 and 9). Miscellaneous: -d PATTERN, --delimiter=PATTERN Set the record delimiter regular expression to PATTERN. The text between two delimiters, before the first delimiter, and after the last delimiter is considered to be a record. The default record delimiter is the regexp " ", so by default a record is a line. PATTERN can be any regular expression that does not match the empty string. For example, using -d "^From " defines mail messages as records in a Mailbox format file. -v, --invert-match Select non-matching records instead of matching records. -V, --version Print version information and exit. -y, --nothing Does nothing. This options exists only for compatibility with the non-free agrep program. --help Display a brief help message and exit. Output control: -B, --best-match Only output the best matching records, that is, the records with the lowest cost. This is currently implemented by making two passes over the input files and cannot be used when reading from standard input. --color, --colour Highlight the matching strings in the output with a color marker. The color string is taken from the GREP_COLOR environment vari- able. The default color is red. -c, --count Only print a count of matching records per each input file, suppressing normal output. -h, --no-filename Suppress the prefixing filename on output when multiple files are searched. -H, --with-filename Prefix each output record with the name of the input file where the record was read from. -l, --files-with-matches Only print the name of each input file which contains at least one match, suppressing normal output. The scanning for each file will stop on the first match. -n, --record-number Prefix each output record with its sequence number in the input file. The number of the first record is 1. -q, --quiet, --silent Do not write anything to standard output. Exit immediately with zero exit status if a match is found. -s, --show-cost Print match cost with output. --show-position Prefix each output record with the start and end offset of the first match within the record. The offset of the first character of the record is 0. The end position is given as the offset of the first character after the match. -M, --delimiter-after By default, the record delimiter is the newline character and is output after the matching record. If -d is used, the record delim- iter will be output before the matching record. This option causes the delimiter to be output after the matching record. With no FILE, or when FILE is -, reads standard input. If less than two FILEs are given -h is assumed, otherwise -H is the default. DIAGNOSTICS
Exit status is 0 if a match is found, 1 for no match, and 2 if there were errors. If -E or -# is not specified, only exact matches are selected. PATTERN is a POSIX extended regular expression (ERE) with the TRE extensions. REPORTING BUGS
Report bugs to the TRE mailing list <tre-general@lists.laurikari.net>. COPYRIGHT
Copyright (C) 2002-2004 Ville Laurikari. This is free software, and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute this software under certain conditions; see the source for the full license text. TRE agrep 0.8.0 November 21, 2004 tre-agrep(1)
Man Page