I want to set a variable in a shell (bash) script with a newline as one of the characters.
First question, how do you do it? Second question, how do you prove it's there once you've done it?
I *think* there are several fairly obvious ways of doing it, e.g. things like:-
export fred="abcde ghijk"
However the problem is that using 'echo' to see what you have done is totally useless as echo does so many clever things under the cover that you don't get to see what's actually in the variable at all.
If you do the above and then say "echo $fred" you just get:-
abcde ghijk
Harrumph! *Surely* there's some way of saying "show me what's really in this variable/string" (a bit like 'od' but for variables).