On Thu, Jul 21, 2016 at 05:56:13PM +0200, Reuti wrote:
> While we are on this: wondering about the difference about -h and -L I found 
> that `man test` outputs on OS X:
> 
> "     -h file       True if file exists and is a symbolic link.  This 
> operator is retained for compatibility with pre-
>                    vious versions of this program. Do not rely on its 
> existence; use -L instead."
> 
> while on Linux `man test` just states that it's the same. Is there any 
> preference which one should be used for the bash builtin?

POSIX documents both -h and -L
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html

It doesn't appear to give any preference for one over the other.  I don't
even see anything in the Rationale.  I don't know why the OS X man page
is deprecating one of them over the other.

Reply via email to