From f10c0dee4ffc5b5d0e2b61fa5a5a1c271fd09c74 Mon Sep 17 00:00:00 2001 From: Gurjeet Singh Date: Wed, 15 Dec 2021 00:02:59 -0800 Subject: [PATCH] Fix tool-script naming for 3 or more DB instance sets Unset IFS, so that Bash uses the default setting. Remove quotes around the underscore to eliminate error. Without these fixes the tool_1.pg_rep_test is repeatedly overwritten instead of using numbers higher than 1. --- pg_rep_test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pg_rep_test b/pg_rep_test index bd8233c..4a7697c 100755 --- a/pg_rep_test +++ b/pg_rep_test @@ -1231,8 +1231,8 @@ file_body=$(cat <<-'TOOL_FILE' TOOL_FILE ) - local IFS="" - while [[ $(ls -A "tool${subset:+'_'$subset}.pg_rep_test" 2> /dev/null) ]] + unset IFS + while [[ $(ls -A "tool${subset:+_$subset}.pg_rep_test" 2> /dev/null) ]] do ((subset++)) done