* Bash: <test -w file> = true for a read-only file !!!
@ 1998-10-08 8:26 Laurent Ricci
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Ricci @ 1998-10-08 8:26 UTC (permalink / raw)
To: gnu-win32
Hi B19 developers,
The test -w doesn't work on windows and unix files !!!
If I perform the following statement on a read-only file
MyReadOnlyFile, the result is <Is writable> !!!
if [-w MyReadOnlyFile ]
then
echo "Is writable"
else
echo "Is readonly"
fi
My gnu-win32 beta release is:
uname -a : CYGWIN32_NT GLOBBY10 4.0 19.1 i686 unknown
Thanks for help or for patch...
bye
---
Laurent Ricci
Workstation ag
tel: ++(41 21) 925 88 37
fax: ++(41 21) 925 88 01
e-mail: lri@wag.ch
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bash: <test -w file> = true for a read-only file !!!
@ 1998-10-09 11:14 Joseph Banta
0 siblings, 0 replies; 2+ messages in thread
From: Joseph Banta @ 1998-10-09 11:14 UTC (permalink / raw)
To: 'gnu-win32@cygnus.com'
Laurent Ricci (lri@wag.ch) wrote:
> If I perform the following statement on a read-only file MyReadOnlyFile, the result is !!!
> if [-w MyReadOnlyFile ]
> then
> echo "Is writable"
> else
> echo "Is readonly"
> fi
I have noticed this too, and that 'sh' and 'bash' will often return different results from
the same test. I guess the answer is to get the best copy of sh / bash from one of the
primary hackers here and use it as both sh and bash.
Anyone have a better answer?
Joseph Banta
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-10-09 11:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-08 8:26 Bash: <test -w file> = true for a read-only file !!! Laurent Ricci
1998-10-09 11:14 Joseph Banta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).