Show HN: Basic Set Operations
sets.alephnull.co
sets.alephnull.co
set_minus A B
... prints every line in A that's not in B. Similarly the others.Fast, clean, command-line, results to be piped to be processed or put into files.
Alternatively, if you want to union files you can just do this:
sort A B | sort -u
If you want to find the intersection: sort <( sort -u A ) <( sort -u B ) \
| uniq -c \
| grep " 2 " \
| sed "s/^ *2 *//"
So all these things are easily done from the command line.Even so, as I said, I can see how some people would want a web-based tool, so thanks for sharing!
I thought this might be interesting to other people! I built this little tool because I often found myself needing to quickly calculate a union, intersection, or difference of two lists, but there wasn't an easy way to it (aside from pulling up Excel and building a v-lookup).
I thought it might be useful to share, I've been using it a bunch to just quickly do some data operations and then drop the result into a SQL query or job processor.
Let me know if you have any feedback!