I am trying to filter IP Range, which partially works as it also includes a higher range.
I need only the range from 10.0.0.1 until 10.20.0.254.
The problem is that it also matches the network 10.x.120.x.
Here is the syntax I used:
egrep '10.([0-9]{1,3}).([0-1]|[0-9]|20).([0-9]{1,3})'
Example:
echo '10.2.120.0' | egrep '10.([0-9]{1,3}).([0-1]|[0-9]|20).([0-9]{1,3})'
It also prints undesirable IPs. I would like to limit it to 10.x.20.x.