+ a1=(A B "C D" E F)
+ elem_in_array A A B 'C D' E F
+ local e=A
+ shift
+ a=("$@")
+ local a
++ printf '\x00%s\x00' A B 'C D' E F
./prog.sh: line 8: warning: command substitution: ignored null byte in input
++ printf '\x00%s\x00' A
./prog.sh: line 8: warning: command substitution: ignored null byte in input
+ [[ ABC DEF =~ A ]]
+ echo Y
+ elem_in_array B A B 'C D' E F
+ local e=B
+ shift
+ a=("$@")
+ local a
++ printf '\x00%s\x00' A B 'C D' E F
./prog.sh: line 8: warning: command substitution: ignored null byte in input
++ printf '\x00%s\x00' B
./prog.sh: line 8: warning: command substitution: ignored null byte in input
+ [[ ABC DEF =~ B ]]
+ echo Y
+ elem_in_array 'C D' A B 'C D' E F
+ local 'e=C D'
+ shift
+ a=("$@")
+ local a
++ printf '\x00%s\x00' A B 'C D' E F
./prog.sh: line 8: warning: command substitution: ignored null byte in input
++ printf '\x00%s\x00' 'C D'
./prog.sh: line 8: warning: command substitution: ignored null byte in input
+ [[ ABC DEF =~ C D ]]
+ echo Y
+ elem_in_array AB A B 'C D' E F
+ local e=AB
+ shift
+ a=("$@")
+ local a
++ printf '\x00%s\x00' A B 'C D' E F
./prog.sh: line 8: warning: command substitution: ignored null byte in input
++ printf '\x00%s\x00' AB
./prog.sh: line 8: warning: command substitution: ignored null byte in input
+ [[ ABC DEF =~ AB ]]
+ echo BUG