diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2024-12-06 20:45:18 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-12-06 20:45:18 +0530 |
commit | b23942399870baeae376c6c9c59defd99c0e9d53 (patch) | |
tree | e8587011933263d81b2bb01e1bb60925e253b8d0 /scripts/diff.py | |
parent | 91c9685c00eb1273fdfb32db7fd63adafcbeb25a (diff) |
move to scripts/
Diffstat (limited to 'scripts/diff.py')
-rwxr-xr-x | scripts/diff.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/diff.py b/scripts/diff.py new file mode 100755 index 0000000..349406d --- /dev/null +++ b/scripts/diff.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 + +import sys + +if len(sys.argv) != 3: + print(f'Usage: {sys.argv[0]} ONE TWO') + +one = open(sys.argv[1]).read().split('\n') +two = open(sys.argv[2]).read().split('\n') + +print(f'{sys.argv[2]} doesn\'t contain:\n') +for i in one: + if i not in two: + print(i) + +print('\n\n\n') +print(f'{sys.argv[1]} doesn\'t contain:\n') +for i in two: + if i not in one: + print(i) |