CLI tool that can be used to do set operations like union on files considering them as a set of lines.
- It ignores all empty lines with whitespaces.
- Each output line occurs only once, because we're treating the files as sets and the lines as their elements.
- List data type has been used instead of set to maintain the order of lines.
- It ignores all lines endings (
\n) when comparing lines, so two input lines compare the same if their only difference is that one ends in
\r\nand the other in
union x youtputs the lines that occur in either
intersection x youtputs the lines that occur in both
difference x youtputs the lines that occur in
xbut not in
git clone https://github.com/daspartho/file-set.git cd file-set
python main.py <operation> <first file> <second file>
python main.py union test.py temp.txt
- symetric difference
- is subset