mardi 22 mars 2016

sed: how to locate between two ranges (Numeric)

Is it possible to use Sed to locate between two IP Addresses?

Currently am doing:

sed '/85.159.56/s/$/ ---  API SYSTEMS/'

But i have a specific range i want to have print out next to it (This is part of a bigger script)

For example:

sed '/192.200.160.0 - 192.200.191.255/s/$/ ---  APIv2 SYSTEMS/'

I know this is not the correct format. But ideally i want Sed to locate the string between these two ranges Then print out next to it --- APIv2 SYSTEMS/

I have tried many ways and unable to accomplish, Making me think Sed not the tool for the job.

Aucun commentaire:

Enregistrer un commentaire