multi line string in bash
Multiline strings can be assigned in bash using one of these two examples.
$ String='foo1
foo2
foobar2'
STRING=$( cat <<EOF
foo1
foo2
foobar2
EOF
)
$ String='foo1
foo2
foobar2'
STRING=$( cat <<EOF
foo1
foo2
foobar2
EOF
)
Comments