Digital Mages - ipgrep(1)
IPGREP
Section: User Contributed Perl Documentation (1)
Updated: 2019-04-21
Index
NAME
ipgrep - IP-oriented grep
VERSION
$Id: bin/ipgrep, 0.2 2019/04/21 20:47:51 acorliss Exp $
USAGE
Usage: ipgrep [-ehqV] {
IP/CIDR} [file1 ...]
-e --exact Match IP/address exactly
-h --help Show this text
-q --quiet Don't echo matches
-V --version Show program version
Like traditional grep, this utility has three possible return values:
0 matches found
1 no matches found
2 errors occurred during processing
If no files are specified it will assume input will be fed to STDIN.
DESCRIPTION
A grep utility specifically meant to find lines in files or input that match a
given
IP or network, for both IPv4 and IPv6. It supports both exact and
network-based matching, in either direction.
REQUIRED ARGUMENTS
IP/CDIR
The only mandatory argument is a valid
IP address or
CIDR network address.
OPTIONS
-e/--exact
This disables matching within
CIDR ranges in liew of an exact match. Boundary
checks are performed, so an
IP like 192.168.0.10 won't be returned when
looking for 192.168.0.1, but 192.168.0.1/24 would.
-h/--help
This prints out a basic usage statement.
-q/--quiet
This suppresses
STDOUT output, typically for use in batch scripting much as
you would normal grep. In that case, the return value should be check.
-V/--version
This prints out the current version of the tool.
FILES
Any additional arguments after the
IP/CIDR argument will be assumed to be
files in which that address should be searched. If there are no such file
arguments, it will be assumed that
STDIN will be searched.
DIAGNOSTICS
None.
EXIT STATUS
The following exit values are supported:
0 matches found
1 no matches found
2 an error occured during operation
CONFIGURATION
None.
BUGS AND LIMITATIONS
Many.
AUTHOR
Arthur Corliss (
corliss@digitalmages.com)
LICENSE AND COPYRIGHT
This software is licensed under the same terms as Perl, itself.
Please see
http://dev.perl.org/licenses/ for more information.
(c) 2016, Arthur Corliss (corliss@digitalmages.com)
Index
- NAME
-
- VERSION
-
- USAGE
-
- DESCRIPTION
-
- REQUIRED ARGUMENTS
-
- IP/CDIR
-
- OPTIONS
-
- -e/--exact
-
- -h/--help
-
- -q/--quiet
-
- -V/--version
-
- FILES
-
- DIAGNOSTICS
-
- EXIT STATUS
-
- CONFIGURATION
-
- BUGS AND LIMITATIONS
-
- AUTHOR
-
- LICENSE AND COPYRIGHT
-
Copyright © 1997 - 2016,
Arthur Corliss, all rights reserved.