[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $(<file) requotes the quotes?
From: |
Chet Ramey |
Subject: |
Re: $(<file) requotes the quotes? |
Date: |
Wed, 27 Nov 2002 09:16:25 -0500 |
> Where? "Command Substitution" doesn't mention anything about quoting or
> quote removal. The section on "Quote Removal" talks about "the preceeding
> expansions," and makes no exception for command substitution.
>
>
> > Nor does $(<file). It's a matter of what *isn't* being done, which
> > normally is done (by bash) for text that is part of the script itself.
> > You would see the same behavior with cat.
>
> Ah. Bummer.
>
>
> Thanks for the answer!
One additional thing that was not pointed out in this discussion is the
fact that the xtrace (set -x) code attempts to quote its output in such
a way that it can be reused as input. This accounts for the additional
quotes you saw when you enabled set -x.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Chet Ramey, ITS, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/