How can i split my long string constant over multiple lines?
I realize that you can do this:
echo "continuation \\
lines"
>continuation li
You can use bash arrays
$ str_array=("continuation"
"lines")
then
$ echo "${str_array[*]}"
continuation lines
there is an extra space, because (after bash manual):
If the word is double-quoted,
${name[*]}expands to a single word with the value of each array member separated by the first character of the IFS variable
So set IFS='' to get rid of extra space
$ IFS=''
$ echo "${str_array[*]}"
continuationlines