How to safely print variable's value without quotes?

May 20, 2008
9,281
62
Syracuse, NY, USA
If it were in my environment it would be a file name and it would have to be quoted to use it. I would
Code:
v:\> echo "%_title"
"yy && xx"
SETDOS will help if you want to echo arbitrary text.
Code:
v:\> setdos /x-5

v:\> echo %_title
yy && xx

v:\> setdos /x+5
 
Aug 23, 2010
356
5
That's a hack, which only works if all I need to print is the value of a variable on a separate line and nothing else.
 
Aug 23, 2010
356
5
I don't see a use case for this to begin with.
But there's multiple ways to achieve same effect in POSIX system.
Most portable is to use sed to insert EOL's between characters. Something like
echo "$str" | sed -e "s/./\\0\\n/g;"
 
May 20, 2008
9,281
62
Syracuse, NY, USA
I don't see a use case for this to begin with.
But there's multiple ways to achieve same effect in POSIX system.
Most portable is to use sed to insert EOL's between characters. Something like
echo "$str" | sed -e "s/./\\0\\n/g;"
It's more useful than echoing "yy && xx" and your suggestion is doesn't do much for me. What's $str?