home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.bash.bug
- Path: sparky!uunet!cis.ohio-state.edu!att.com!Dan_Jacobson
- From: Dan_Jacobson@att.com
- Subject: builtin test -w unaware of group permissions
- Message-ID: <1992Jul24Fr201034a.Dan_Jacobson@ATT.COM>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Sat, 25 Jul 1992 00:10:00 GMT
- Approved: bug-bash@prep.ai.mit.edu
- Lines: 31
-
- It seems Bash's builtin "test" command didn't know that I could write
- a file based on group permissions, whereas all the other "test"
- commands I could find worked OK.
-
- SunOS Release 4.1.2 BASH_VERSION=1.12.1
- bash$ ls -lg music.cal
- -rw-rw-r-- 1 pwyc rnd 4284 Jul 24 16:35 music.cal
- bash$ id
- uid=47941(danj1) gid=47941(danj1) groups=47941(danj1),34718(rnd)
- bash$ touch music.cal
- bash$ ls -lg music.cal
- -rw-rw-r-- 1 pwyc rnd 4284 Jul 24 18:54 music.cal
- bash$ test -w music.cal && echo writeable
- bash$ /bin/test -w music.cal && echo writeable
- writeable
- bash$ type test
- test is a shell builtin
- bash$ ksh
- $ type test
- test is a shell builtin
- $ test -w music.cal && echo ksh says writeable
- ksh says writeable
- $ sh
- $ test -w music.cal&& echo sh too
- sh too
- $ type test
- test is a shell builtin
- $ csh
- ihspa% if (-w music.cal) echo ooooo
- ooooo
-
-