Subject: Re: use of [ -e ${file} ]
To: None <tech-pkg@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-pkg
Date: 05/22/2004 12:03:52
On Sat, 22 May 2004 08:53:26 +0200, Roland Illig <roland.illig@gmx.de>
wrote:
> Georg Schwarz wrote:
> > pkgsrc/security/openssl uses some expressions like
> > [ -e ${file} ]
> > in ./work/.DEINSTALL and ./work/.INSTALL to figure out whether a
> > partiular file exists or not. (I have no idea where the code for these
> > files comes from, whether it is from pkgsrc or from OpenSSL).
> > Some other scripts with other packages might do the same.
> 
> The autobook states that almost all system know about "test -f $file". 
> Or, alternatively "test -f $file".

Did you perhaps mean "test -r $file"?  That works for files, directories,
links, and devices.  

--jkl