Re: [[ -L $A ]] matches both symlinks and symlinks to directories
From:
Paul Jarc
Subject:
Re: [[ -L $A ]] matches both symlinks and symlinks to directories
Date:
Fri, 07 May 2004 16:05:18 -0400
User-agent:
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)
Justin Pryzby <justinpryzby@users.sourceforge.net> wrote:
> Oops - my bad, what I meant was:
>
> [[ -d $A ]] matches both directories and symlinks to
> directories.
Ah. Yes, that's what SUSv3 specifies.
<URL:http://www.opengroup.org/onlinepubs/009695399/utilities/test.html>
# With the exception of the -h file and -L file primaries, if a file
# argument is a symbolic link, test shall evaluate the expression by
# resolving the symbolic link and using the file referenced by the link.
paul