Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: Re: ksh compatibility: initial value of $_



Haai,

On Wed, 05 Apr 2023 03:03:35 +0200, Oliver Kiddle <opk@xxxxxxx> wrote:
> "Jun. T" wrote:
> Given that you're ignoring the output, test -L is likely more portable
> in this case. Specifically it would work on Solaris 10 which doesn't
> have readlink (but does have /proc/self/path/a.out). test -L is covered
> by the POSIX standard while readlink isn't.

FWIW, OpenBSD test(1) says--

     --LL _f_i_l_e
             True if _f_i_l_e exists and is a symbolic link.  This operator is for
             compatibility purposes.  Do not rely on its existence; use --hh
             instead.

Note that last part. Is "-L" actually more standard? (Even on other
*cough* Unices, me's always used "-h").

There's also stat(1), but that appears to be even less standard than
readlink(1).

> Oliver

        --zeurkous.

-- 
Friggin' Machines!




Messages sorted by: Reverse Date, Date, Thread, Author