From 2b551717145e3dd77adbf347e936938102978a26 Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Tue, 14 Mar 2023 22:46:32 -0400 Subject: [PATCH] Add a crude audit function Identifies duplicate lines. Toward #7. --- audit.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 audit.sh diff --git a/audit.sh b/audit.sh new file mode 100755 index 0000000..54bd26f --- /dev/null +++ b/audit.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +for file in transcripts/* +do + repeats=( $(grep -E ".{31,}" "$file" |sort |uniq -c |sort -nr |head -1 |sed 's/\"//g' |sed "s/\'//g" |xargs |cut -d " " -f 1) ) + if [[ $repeats -gt 6 ]]; then + echo "$file $repeats duplicate lines" + fi +done