From 65a385a2c76c1bfc7cf8f43082edd18cb1192669 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Fri, 6 Dec 2024 20:41:29 +0530 Subject: add scripts --- diff.py | 18 ++++++++++++++++++ get_paths.sh | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 diff.py create mode 100755 get_paths.sh diff --git a/diff.py b/diff.py new file mode 100644 index 0000000..226248f --- /dev/null +++ b/diff.py @@ -0,0 +1,18 @@ +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) diff --git a/get_paths.sh b/get_paths.sh new file mode 100755 index 0000000..b62cefc --- /dev/null +++ b/get_paths.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +cat $1 | grep "