[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: white spaces are kept for a variable
From: |
Paul Smith |
Subject: |
Re: white spaces are kept for a variable |
Date: |
Mon, 25 Apr 2011 09:01:04 -0400 |
On Mon, 2011-04-25 at 07:48 +0430, ali hagigat wrote:
> In the following example, why white spaces before "pedagogi" are not
> removed for var2?
>
> var1=
> var2=$(var1) pedagogi
The manual says:
> Whitespace around the variable name and immediately after the `=' is
> ignored.
There is no whitespace immediately after the "=" here, so there's
nothing to ignore.
Parsing of the line into a variable name and value, including throwing
away whitespace, comes BEFORE expansion.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist