Hello Wietse, hello list,

Wietse Venema wrote:

What I describe is not list notation. Specifically, the glob {1,2,11}
means 1 AND 2 AND 11,  while the pattern [1,2,11] means 1 OR 2 OR 11.

    $ echo {1,2,11}
    1 2 11
    $ echo {1..11}
    1 2 3 4 5 6 7 8 9 10 11

If we want to avoid confusion, then we should not use AND notation
in places where OR operation is intended.

I'd also suggest the shell brace expansion like syntax. The AND or OR ist what an application makes out of the syntax, not what the syntax originally is for. Infact, it just describes a set. For your needs, it would describe a "set of octetts".

Individuals and ranges could be combined (nothing a shell like Bash does):

{1,5,7..9,25,30}
--> 1,5,7,8,9,25,39

{1,2,4..8..2}
--> 1,2,4,6,8

For the reason Johan van Selst mentioned, I wouldn't use brackets here. Beside this, using braces or brackets is just a matter of taste IMHO.

--
Be conservative in what you do, be liberal in what you accept from others.
- jbp, master of the net, in RFC793

Reply via email to