#495374 grepcidr: Provision of -o option to output only matched parts of a line

Package:
grepcidr
Source:
grepcidr
Description:
Filter IP addresses matching IPv4/IPv6 CIDR/network specification
Submitter:
Mark Hobley
Date:
2015-11-28 19:27:03 UTC
Severity:
wishlist
#495374#5
Date:
2008-08-16 19:54:14 UTC
From:
To:
It would be useful to be able to use this tool for matching of IP
addresses within an arbitary text field. This would require the use of
a -o option to output only matched parts of a line.

An example application of this is demonstrated as follows:

echo 'qwer(023)7964min@liverpool12.8ero&roir123.28.49.59(t95)@torprp' |
grepcidr -o 0.0.0.0-255.255.255.255
123.28.49.59

It may also be useful to be able to use 0.0.0.0/0 to represent any IP
address (or better still do this by default, and allow omission of the
IP address related arguments:

echo 'qwer(023)7964min@liverpool12.8ero&roir123.28.49.59(t95)@torprp' |
grepcidr -o
123.28.49.59

Mark.

#495374#10
Date:
2015-11-28 06:53:51 UTC
From:
To:
forwarded 495374 jem@berkes.ca
thanks

grepcidr is actively maintained upstream; I have forwarded your request
to Jem Berkes.

0.0.0.0/0 is supported by grepcidr 2.0, which has been uploaded to sid.

#495374#17
Date:
2015-11-28 19:13:41 UTC
From:
To:
Sorry, yesterday I accidentally sent an email to this bug from my work
address (mailto: links via Thunderbird don't always default to the
profile you expect).  While the content was correct, FAOD it should have
been sent as a Debian Maintainer, not as a Canonical employee.

Ryan