This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Bash: <test -w file> = true for a read-only file !!!
- To: "'gnu-win32 at cygnus dot com'" <gnu-win32 at cygnus dot com>
- Subject: Re: Bash: <test -w file> = true for a read-only file !!!
- From: "Joseph Banta" <joe_banta at perceptics dot com>
- Date: Fri, 9 Oct 1998 10:00:27 -0400
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".