help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: echo bug?


From: Paul Jarc
Subject: Re: echo bug?
Date: Sun, 09 Dec 2007 19:45:51 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Randy Yates <yates@ieee.org> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]