bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: "Kaulkwappe" <kaulkwappe@prvy.eu>
To: 60981@debbugs.gnu.org
Subject: bug#60981: Bug in man page for the "test" command
Date: Sat, 21 Jan 2023 01:15:19 +0100	[thread overview]
Message-ID: <5xng0h0bh.eGdhs8@prvy.eu> (raw)

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





             reply	other threads:[~2023-01-21  8:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21  0:15 Kaulkwappe [this message]
2023-01-21  9:10 ` bug#60981: Bug in man page for the "test" command Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5xng0h0bh.eGdhs8@prvy.eu \
    --to=kaulkwappe@prvy.eu \
    --cc=60981@debbugs.gnu.org \
    --cc=kaulkwappe+0cvos0vxyd@prvy.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).