[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tilde expansion not performed during variable evaluation
From: |
Paul Jarc |
Subject: |
Re: Tilde expansion not performed during variable evaluation |
Date: |
Wed, 11 Oct 2006 00:44:19 -0400 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
Karen Etheridge <karen@etheridge.ca> wrote:
> Tilde expansion is not being performed when variables are being evaluated.
That's normal, documented behavior. man bash, EXPANSION:
The order of expansions is: brace expansion, tilde expansion,
parameter, variable and arithmetic expansion and command
substitution (done in a left-to-right fashion), word splitting,
and pathname expansion.
So after parameter expansion, it's too late for tilde expansion. If
you know that tilde is the only special character in your variable,
you could use eval to pass it through a second round of expansion.
paul