Re: echo bug?

[email protected] (Paul Jarc)
Newsgroups gmane.comp.gnu.utils
Organization What did you have in mind? A short, blunt, human pyramid?
Message-ID <[email protected]>
Randy Yates <[email protected]> wrote:
> Sorry - that's what I meant to type. That is to say, "echo -e $text$"
> doesn't work. 

Without knowing what "doesn't work" is supposed to mean, and guessing
that last "$" was a typo, I think what you're missing is that variable
expansions that aren't quoted are subject to word splitting at
whitespace.  If you want to preserve the whitespace in a variable's
value, you have to quote it when expanding it:
echo -e "$text"


paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.