[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bashbug bug, tilde bug
From: |
Paul Jarc |
Subject: |
Re: bashbug bug, tilde bug |
Date: |
Wed, 18 Jun 2003 14:28:16 -0400 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
Davis Herring <herring@lanl.gov> wrote:
> I suppose it's valid to say that the tilde did not appear in an
> assignment (because tilde expansion had already been done when the
> function was executed), but if so the docs should state that such
> expansion is not re-performed in functions' parameters.
The man page says:
The order of expansions is: brace expansion, tilde expansion, parame-
ter, variable and arithmetic expansion and command substitution (done
in a left-to-right fashion), word splitting, and pathname expansion.
So it follows that when $2 is expanded in your function call
(parameter expansion), it is too late for any resulting tildes to be
considered for tilde expansion. Function parameters are not special
here; this applies to any parameter expansion.
paul