bug-bash
[Top][All Lists]
Advanced

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

Re: Parameter expansion oddity


From: Paul Jarc
Subject: Re: Parameter expansion oddity
Date: Tue, 08 Jul 2003 12:59:11 -0400
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Bill Nottingham <notting@redhat.com> wrote:
> Chet Ramey (chet@nike.ins.cwru.edu) said:
>> Are you wedded to using here documents?  Remember that here-docs
>> are expanded as if the contents occur within double quotes, but
>> that double quotes within the document aren't treated specially.
>
> For this app, yes, it would be irritating to not be able to use here-docs
> (the alternative is writing temporary files and piping those through
> commands.)

But is it necessary to do the complex expansion inside the here
document?

FOO=bar
FOO_here=${FOO:+\"$FOO\"}
cat <<EOF
${FOO_here}
EOF


paul




reply via email to

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