Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using --reduce-factor disables --except #31

Open
idallen opened this issue Apr 5, 2022 · 1 comment
Open

using --reduce-factor disables --except #31

idallen opened this issue Apr 5, 2022 · 1 comment

Comments

@idallen
Copy link

idallen commented Apr 5, 2022

This is from iprange 1.0.5_master.

First, set up two test files:

    $ cat <<EOF >in
    1.2.3.4
    1.2.3.5
    1.2.3.6
    9.9.9.6
    9.9.9.7
    9.9.9.8
    9.9.9.9
    EOF

    $ cat <<EOF >except
    1.2.3.4
    1.2.3.5
    1.2.3.6
    EOF

Without using --reduce-factor I get the expected output:

    $ iprange in --except except >out
    $ iprange in --diff out
    1.2.3.4/31
    1.2.3.6

Using any value of --reduce-factor causes the --except to be ignored:

    $ iprange in --except except --reduce-factor 0 >out
    $ iprange in --diff out
    $ iprange in --except except --reduce-factor 10 >out
    $ iprange in --diff out
    $ iprange in --except except --reduce-factor 90 >out
    $ iprange in --diff out
    $ diff in out
    $
@idallen
Copy link
Author

idallen commented Sep 21, 2022

If you do the operations sequentially, you get the correct output:

$ iprange in --except except >tmp
$ iprange tmp --reduce-factor 90 >out
$ iprange in --diff out
1.2.3.4/31
1.2.3.6

If you reverse the order of the two options, you get the correct output:

$ iprange in --reduce-factor 90 --except except >out
$ iprange in --diff out
1.2.3.4/31
1.2.3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant