Re: Porting pam to Solaris, HP-UX, others

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 13 Dec 2000, Michael Gerdts wrote:

> This is not quite true.  I *think* that /bin/test is quite portable.
> (/bin -> /usr/bin in Solaris)...
> 
>    % /bin/test -e /foo && echo yes || echo no
>    no
> 
>    % /bin/test -e /tmp && echo yes || echo no
>    yes

Ah!  So it does.  I stand corrected on this technicality (I was going by
the man pages of the various flavours...)

But what we are aiming for is portability.  That is, in the Venn diagram
of systems and command-flavours, we are looking for maximum overlap.  By
contrast, the "-e" flag of a particular version of test inhabits one or
two remote outliers, with hardly any overlap.  So if reasonably possible,
it should be replaced by something common to as much as possible.

Hence my suggestion of "-f", which seems widely available, and doesn't
adversely affect the use to which we are putting it (although it may be
possible to dream up pathological cases if someone has gone in behind the
back of "make" with malice aforethought).

So in our context of portability, it would still seem far preferable to
use the common "-f" flag rather than the rare "-e" flag. 

-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :





[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux