From ce0cd2d93ce8832c69dc8ec6179667ab30cb12f6 Mon Sep 17 00:00:00 2001 From: George Kapetanakis Date: Thu, 26 Mar 2026 15:40:16 -0400 Subject: [PATCH] Fix use of undefined variable in shell script --- Notes/snippets/shell-example-process-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Notes/snippets/shell-example-process-files.sh b/Notes/snippets/shell-example-process-files.sh index 118731b0..c0285dd1 100644 --- a/Notes/snippets/shell-example-process-files.sh +++ b/Notes/snippets/shell-example-process-files.sh @@ -16,7 +16,7 @@ while IFS= read -r line; do # 检查 model_id 是否已经出现过 if [[ ! "${seen_model_ids[@]}" =~ "${model_id}" ]]; then seen_model_ids+=("$model_id") - echo "$line" >> "$new_file_list" + echo "$line" >> "$unique_file" fi done < "$original_file"