pure-sh-bible
pure-sh-bible copied to clipboard
dash "-L" test for symbolic link may not be reliable
Using dash
I came across this and thought it may effect you.
-L file True if file exists and is a symbolic link. This operator is
retained for compatibility with previous versions of this
program. Do not rely on its existence; use -h instead.
-L
and -h
are both valid here:
https://linux.die.net/man/1/test
I can find your text in BSD, but it's the opposite! https://www.freebsd.org/cgi/man.cgi?test
-h file True if file exists and is a symbolic link. This operator is retained for compatibility with previous versions of this program. Do not rely on its existence; use -L in- stead.
Where can I find your reference in dash
itself?
I was using Linux Mint 20 Cinnamon, man dash
Looks like this is a contentious bone ..
I checked with Debian (Devuan) man dash
and it agrees with your Mint 20, saying to use -h
.
I find myself disinclined to agree with both Mint and Duvian.