From b23942399870baeae376c6c9c59defd99c0e9d53 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Fri, 6 Dec 2024 20:45:18 +0530 Subject: move to scripts/ --- scripts/diff.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/diff.py (limited to 'scripts/diff.py') 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) -- cgit v1.2.3