Article View: gnu.bash.bug
Article #169More on test -w
From: Peter Su
Date: Wed, 28 Jun 1989 19:37
Date: Wed, 28 Jun 1989 19:37
8 lines
715 bytes
715 bytes
My last message was kind of bogus, I apologize. The problem is that test -w always fails on directories. Seems that the open call in SunOS 4.0 returns and error if you try to open a directory for writing. Thus, open may not be the way to handle the -w switch to test. Perhaps the fix would be to use access instead? Pete
Technical Details
Message-ID:
<8906281937.AA00818@griggs.dartmouth.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!GRIGGS.DARTMOUTH.EDU!hugoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!GRIGGS.DARTMOUTH.EDU!hugo From: hugo@GRIGGS.DARTMOUTH.EDU (Peter Su) Newsgroups: gnu.bash.bug Subject: More on test -w Message-ID: <8906281937.AA00818@griggs.dartmouth.edu> Date: 28 Jun 89 19:37:10 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 8