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