commit 6f3ad133c88b219edcb8074e94fb654690013d01 Author: DrMaxNix Date: Fri May 31 21:17:12 2024 +0200 Add bash-array-with-spaces.sh diff --git a/bash-array-with-spaces.sh b/bash-array-with-spaces.sh new file mode 100644 index 0000000..115ab65 --- /dev/null +++ b/bash-array-with-spaces.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail + +local oldifs="${IFS}" +IFS="" +for s in ${out_section_list[*]:-}; do + log_debug "out_section_list:: $s" +done +out_section_list=(${out_section_list[@]:-""} "$section_name") +out_section_list=(${out_section_list[@]:-""} "bad evil name") +IFS="${oldifs}"