bug-bash
[Top][All Lists]
Advanced

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

Re: Pathname expansion not performed in Here Documents


From: Pierre Gaston
Subject: Re: Pathname expansion not performed in Here Documents
Date: Mon, 27 Feb 2012 15:02:01 +0200

On Mon, Feb 27, 2012 at 2:50 PM, Steven W. Orr <address@hidden> wrote:
> On 2/27/2012 1:26 AM, Pierre Gaston wrote:
>>
>> On Mon, Feb 27, 2012 at 6:44 AM, Davide Baldini
>> <address@hidden>  wrote:
>>>
>>> On 02/27/12 05:04, DJ Mills wrote:
>>>>
>>>> Think of regular here-doc (with an unquoted word) as being treated the
>>>> same way as a double-quoted string
>>>
>>>
>>> Thank you Mills, of course I can understand it _now_, after having hit
>>> the problem, but my point is different: the description of a program's
>>> details should be first of all in its main point of reference, its
>>> manual. I'm a bit surprised that while the developers elite perfectly
>>> know the correct details, nobody is going to review a misleading manual
>>> being a reference for the most of us.
>>
>>
>> The manual seems quite clear:
>> "If word is unquoted, all lines of the here-document are subjected to
>> parameter  expansion,  command  substitution,  and arithmetic
>> expansion.  In the latter case, the character sequence \<newline>  is
>> ignored, and \ must be used  to  quote the characters \, $, and `."
>>
>> Maybe you could point the part of  the manual that mislead you into
>> thinking that  " here doc are supposed to expand with no special
>> exceptions" so that it can be corrected?
>
>
> I don't mean this in a snarky way, but shell man pages are historically in
> the class of docs that you really need to read over and over again. There
> are a few books on shell programming, most of them not very good, but I
> personally have read the bash man pages literally thousands of times and
> before I'm dead, I expect to multiply that many times over. There are really
> good web pages that people have put a lot of of time and energy into, and
> those are not to be dismissed. The idea is to assemble your resources enough
> that you can know where to go to answer a specific question. In between
> those questions, you really need to re-read your reference material on a
> regular basis.
>
> It never ends. :-)

Sure, reference material is always a bit rough, it's a different thing
to call it misleading.



reply via email to

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