THE ORIGINAL -- HOLDS TEMPORARY NAMES IN MEMORY -- WORKS # bash -x domains_original.sh words.txt out.txt 2 com 30 30 + input=words.txt + output=out.txt + combos=2 + suffix=com + delay=30 + retries=30 + array=($(<"$input")) ++ mix 2 ++ (( 2 < 1 )) ++ for x in '"${array[@]}"' +++ mix 1 apple +++ (( 1 < 1 )) +++ for x in '"${array[@]}"' ++++ mix 0 appleapple ++++ (( 0 < 1 )) ++++ echo appleapple.com +++ echo appleapple.com THE REWRITE -- SUPPOSE TO WRITE TEMPORARY NAMES TO A FILE -- DOESN'T WORK # bash -x domains.sh words.txt thruput.txt out.txt 2 com 30 30 + input=words.txt + thruput=thruput.txt + output=out.txt + combos=2 + suffix=com + delay=30 + retries=30 + mix 2 + (( 2 < 1 )) + read line ++ mix 1 ++ (( 1 < 1 )) ++ read line +++ mix 0 +++ (( 0 < 1 )) +++ echo .com ++ echo .com