Hello everybody,
I am not yet looking for a sponsor, but going to program a tiny tool:
"setop" takes as inputs several lists/sets, calculates desired
(mathematical) set operations on them and outputs the final set (or
depending on operation resulting number of elements, answer yes/no, …).
For example: File A contains 3 3 2 5 1 (each number an extra line). Then
setop A
would result in 1 2 3 5. This is equivalent to
sort | uniq
With a file B containing 5 90 2 7 the command
setop -i A B
would yield 2 5.
Here, -i stands for intersection. Of course, there is no limitation to
numbers, elements can be any non-empty strings. Other operations are
union, symmetric difference, difference, contains element, is subset,
cardinality and so on.
Is this tool senseful, is there a certain need for it?
As you can see on
<http://www.catonmat.net/blog/set-operations-in-unix-shell-simplified/>
nearly all these operations can already be done with other tools, but
the according command lines are mostly very tortuous. There doesn’t seem
to be a tool that directly works with sets.
So my questions is: Is there a need for such a program or is there
already something very similar? (Is this the right place for asking?)
I even exactly know what options setop should have and what it can do
(how it is used), but am waiting for some responses from you before
programming.
Note: I already asked two years ago but didn’t get satisfactory
responses. Only now I remembered my idea.
I would be very grateful for your feedback,
Frank