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: Steven W. Orr
Subject: Re: Pathname expansion not performed in Here Documents
Date: Mon, 27 Feb 2012 07:50:45 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19

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. :-)
--
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net



reply via email to

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