bash join array with newline code example Example: concat strings inside array bash script List="A B C D" for I in $List do OUT=${OUT:+$OUT }-$I done