[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file test bug in bash 3.1
From: |
Chet Ramey |
Subject: |
Re: file test bug in bash 3.1 |
Date: |
Tue, 23 May 2006 08:53:52 -0400 |
User-agent: |
Thunderbird 1.5.0.2 (Macintosh/20060308) |
Zackary Deems wrote:
> echo "blah" >/tmp/blah
> ln -s /tmp/blah /tmp/blah.link
> if [[ -f "/tmp/blah.link" ]]
> then
> echo "/tmp/blah.link is a regular file"
> else
> echo "/tmp/blah.link is NOT a regular file"
> fi
>
> links now match for both links and regular files. This plays hell with
> quite a bit of existing code.
The file status operators, unless specifically described as operating
on symlinks, have always followed symbolic links.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/