The bash builtin test command "test -w file" should exit with a status of 0 if the file exists and is writable by you, and 1 otherwise. bash test determines writability by examining the file's stat structure. This is not enough to determine access on the Andrew filesystem, because you must also authenticate to the fileserver. Note that that if you use the access() system call, vs. the stat() system call, you get what I consider the "right" answer. On the platforms I checked (Sun, IBM, NeXT), /bin/test and the sh and csh builtin test commands use the access() system call. Hence, a workaround is to simply use /bin/test to find out whether a file is writable by you. "test -w" was just an example. "test -r" and "test -x" apply as well. If gnu maintainers want to change "test" to use access() vs stat(), that's ok. I'm just bringing it up. By the way, bash is a great shell! Speaking for myself, I think bash is ideal for our multi-vendor AFS campus environment. Good decision to make it the campus-wide user shell! Brian This was also posted to the moderated usenet newsgroup gnu.bash.bug Ignore it if you eventually see it again.
