🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Dan_Jacobson Sat, 25 Jul 1992 00:10
builtin test -w unaware of group permissions
#225
Author: Dan_Jacobson
Date: Sat, 25 Jul 1992 00:10
30 lines
1279 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads