delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/20/10:37:25

From: nick DOT brealey AT aeat DOT co DOT uk (Nicholas J Brealey)
Subject: Re: Problem with test -r
20 Oct 1997 10:37:25 -0700 :
Message-ID: <199710201633.RAA08778.cygnus.gnu-win32@sdssuna.culham.aeat.co.uk>
References: <199710180806 DOT SAA29556 AT murlibobo DOT cs DOT mu DOT OZ DOT AU>
Mime-Version: 1.0
To: Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au>
Cc: gnu-win32 AT cygnus DOT com

I seem to have deleted the crucial line in my original report.

The problems is that test -r does not return true when a file exists
and is is readable:

bash$ echo hello > xxxx
bash$ chmod og-rwx xxxx
bash$ if test -r xxxx ; then echo OK ;fi
bash$ cat xxxx
hello
bash$ ls -l xxxx
-rw-------   1 1010     everyone        7 Oct 20 16:31 xxxx
bash$


On Solaris I get:

bash$ echo hello > xxxx
bash$ chmod og-rwx xxxx
bash$  if test -r xxxx ; then echo OK ;fi
OK
bash$ cat xxxx
hello
bash$ ls -l xxxx
-rw-------   1 nick   users           6 Oct 20 17:28 xxxx
bash$ 


Sorry for any confusion caused !


Nick
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019