Hello,
I am trying to save a string with a trailing newline to a variable, following
is what i did:
printf -v var1 “%s\n” xyz
now when i echo $var1 it seems the newline disappears, as echo adds a newline
to the end of the output, so i expected a blank line appeared on the screen,
but that’s not what happened. So what’s happening here?
Thanks,
Shuangrong