bug-bash
[Top][All Lists]
Advanced

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

Tilde expansion not performed during variable evaluation


From: Karen Etheridge
Subject: Tilde expansion not performed during variable evaluation
Date: Tue, 10 Oct 2006 12:38:21 -0700
User-agent: Mutt/1.4.2.1i

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: darwin8.7.1
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='darwin8.7.1' -DCONF_MACHTYPE='i386-apple-darwin8.7.1' 
-DCONF_VENDOR='apple' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib -I./lib/intl 
-I/Users/ether/Desktop/bash-3.1/lib/intl  -g -O2
uname output: Darwin hostname-obfuscated 8.8.1 Darwin Kernel Version 8.8.1: Mon 
Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386
Machine Type: i386-apple-darwin8.7.1

Bash Version: 3.1.17
Patch Level: 0
Release Status: release

Description:
    Tilde expansion is not being performed when variables are being evaluated.

Repeat-By:
    mkdir -p testdir/a/gooddir
    mkdir -p \~/testdir/a/baddir
    export TEST_VARIABLE="~/testdir/a"
    ls $TEST_VARIABLE

    expected output:  gooddir
    actual output:    baddir

    (Note that if TEST_VARIABLE is assigned without surrounding quotes,
    tilde expansion will be done at assignment time, e.g. the variable will be
    assigned "/home/userid/testdir/a" rather than "~/testdir/a".)


-- 
              "Discovery consists of looking at the same thing as
             everyone else does and thinking something different."
                - Albert Szent-Gyorgyi, 1937 Nobel Prize Winner
            .             .            .            .             .
Karen Etheridge, karen@etheridge.ca       GCS C+++$ USL+++$ P+++$ w--- M++
http://etheridge.ca/                      PS++ PE-- b++ DI++++ e++ h(-)




reply via email to

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