Simple copy/paste code or download/extract and:
-
Permit to execute
chmod +x removeDumplicate.py
-
Use:
./removeDuplicate.py <source-file> <target-file>
Parameters | Required | Description |
---|---|---|
<source-file> |
Yes | Your file which you want to modify |
-o <target-file> |
No | Destination of file with results of work this script (default: results) |
You have list like:
apple
banana
apple
strawberry
pineapple
banana
After run:
strawberry
apple
banana
pineapple
Pay attention! Script doesn't care about the order of list!
nice! maybe you could write a comment about command line options (although it’s kind of obvious)