I am unable to figure out how to indent parts of bash script, preserving indentation in the code. I want the output to be formatted with correctly without any tabs/spaces prefix to the output lines.
ex: script
#!/bin/bash
INFO1="something
output1"
INFO2="output2"
MY_INFO=INFO1
if [ True ]; then
INFO="
Here are the test results
bbb
ccc
aaa
${!MY_INFO}
"
fi
echo "${INFO}"
output returned:
Here are the test results
bbb
ccc
aaa
something
output1
expected output:
Here are the test results
bbb
ccc
aaa
something
output1