From 83ea4d0feba56c4037c92a51336549ba780a36e7 Mon Sep 17 00:00:00 2001 From: edoardottt Date: Fri, 17 Jul 2026 15:17:33 +0200 Subject: [PATCH] check-dups.sh multi-word section #321 --- scripts/check-dups.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/check-dups.sh b/scripts/check-dups.sh index 6e50ca8..6a794f9 100755 --- a/scripts/check-dups.sh +++ b/scripts/check-dups.sh @@ -29,8 +29,11 @@ check_section() { # Get all unique section headings from the README file and handle spaces and slashes sections=$(grep '^### ' "$readme" | sed 's/^### //' | sed 's/[\/&]/\\&/g') -# Call the function for each section -for section in $sections; do - check_section "$section" -done +# Call the function for each section, reading line by line to preserve spaces +while IFS= read -r section; do + if [[ -n "$section" ]]; then + check_section "$section" + fi +done <<< "$sections" + echo "[ OK! ] NO DUPLICATES FOUND." \ No newline at end of file