bug-bash
[Top][All Lists]
Advanced

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

[[ -L $A ]] matches both symlinks and symlinks to directories


From: Justin Pryzby
Subject: [[ -L $A ]] matches both symlinks and symlinks to directories
Date: Fri, 07 May 2004 13:02:41 -0400

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H  -I.  -I../bash -I../bash/include 
-I../bash/lib  -g -O2
uname output: Linux andromeda 2.6.6-rc2 #10 Wed Apr 21 13:03:14 EDT 2004 i686 
GNU/Linux
Machine Type: i386-pc-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        [[ -L $A ]] matches both symlinks and symlinks to directories

Repeat-By:
        pryzbyj@andromeda:/tmp$ rm a; ln -s . a; if [[ -L a ]]; then echo link; 
fi;
        link

Fix:
        I anticipate that this can't be changed, either because its
        intentional, or because its been that way since 1950 sh v0.01
        and everyone except me wants it that way.  So, I recommend a
        note in the manpage describing this.

        I know, by the way, that [[ -L ${A}/ ]] does not pass, because
        of the trailing slash.




reply via email to

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