From 27d1be4016bf6b38a9b6fcde88efaf8b0f533672412b141a0d66fc2b62e78cb0 Mon Sep 17 00:00:00 2001 From: Techognito Date: Fri, 15 Aug 2025 23:36:46 +0200 Subject: [PATCH] Added Bad Lines Remover in foundrycleaner.sh - set so Auto does line removal - set so auto does line combining (often needed for when the 100th result is on the next line) --- foundrycleaner.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/foundrycleaner.sh b/foundrycleaner.sh index 94ab7b8..3257844 100755 --- a/foundrycleaner.sh +++ b/foundrycleaner.sh @@ -51,10 +51,20 @@ lineCombiner(){ ' "$tempfile" > "$OUTPUT_FILE" } +badLineRemover() { + grep -Ev "[0-9] {1,}" "$tempfile" > "$OUTPUT_FILE" +} + +outToTemp() { + cp "$OUTPUT_FILE" "$tempfile" +} + + ### RUNTIME ### cp "$INPUT_FILE" "$tempfile" +touch $tempfile case $1 in dice) @@ -72,11 +82,18 @@ case $1 in lines) lineCombiner ;; + badlinesrm) + badLineRemover + ;; auto) + lineCombiner + outToTemp + badLineRemover + outToTemp ListSort - cp "$OUTPUT_FILE" "$tempfile" + outToTemp RemoveNumbers - cp "$OUTPUT_FILE" "$tempfile" + outToTemp dice ;; *)