problem with test -w file

Larry Huang
Wed May 12 11:53:00 GMT 1999

Dear Cygnus,

My apologies if this is the wrong place for this message.
I downloaded the Cygwin package several days ago and am generally
please with it (I use the bash shell mostly).  There is one thing
that baffles me though.  In one of my shell scripts I have the
        if test -w $file
to see if the file is writable before doing processing on the file,
but it seems that the result of the test is always 1, i.e. the file
is non-writable.  The same script runs okay on Unix Bourne shell.
Is there something I am doing wrong or is this a bug in test?

Thanks for any help.


Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list