I want to create a variable that contains a string of text [in BASH] that spans multiple lines and includes spaces. I can do this without spaces, but not with spaces.
I am trying to create a flash card program for self study. I am not in school and this is not homework.
This works:
$ TEST=me$'\n'you
$ echo "$TEST"
me
you
This does not work:
$ TEST="me on line one$'\n'you on line two"
$ echo "$TEST"
me on line one$'\n'you on line two
I would like the output of the second code to look like this:
me on line one
you on line two
Note: this is not a duplicate question. The alleged duplicate does not contain an example with spaces, which is why I had a problem.