GNU bug report logs -
#60981
Bug in man page for the "test" command
Previous Next
To reply to this bug, email your comments to 60981 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#60981
; Package
coreutils
.
(Sat, 21 Jan 2023 08:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
kaulkwappe+0cvos0vxyd <at> prvy.eu
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Sat, 21 Jan 2023 08:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Dear colleagues,
this might have been reported before (or not), but there is a confusing description in the man page of the "test command:
###
-e FILE
FILE exists
-L FILE
FILE exists and is a symbolic link (same as -h)
###
The problem here is the situation of a broken symlink. When flag -e is used on a broken symbolic link, it fails. But when -L is used on a broken symlink, it returns true.
While this may be the expected behavior, it does not reflect what the documentation says. Because if -e fails on a broken symlink ("FILE exists") one would assume that the same of course is true for -L. The correct description for -L should be:
###
-e FILE
FILE exists or is valid symbolic link
-L FILE
FILE is a symbolic link, whether broken or not (same as -h)
###
Kind Regards,
Kaulkwappe
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#60981
; Package
coreutils
.
(Sat, 21 Jan 2023 09:11:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 60981 <at> debbugs.gnu.org (full text, mbox):
The man page already addresses this:
Except for -h and -L, all FILE-related tests dereference symbolic
links.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
This bug report was last modified 2 years and 202 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.