Path: utzoo!utgpu!watserv1!watmath!uunet!snorkelwacker!mit-eddie!andante!ulysses!dptg!mtune!jcm From: jcm@mtune.ATT.COM (John McMillan) Newsgroups: unix-pc.general Subject: Re: Fixdisk strangeness Message-ID: <290@mtune.ATT.COM> Date: 5 Feb 90 22:23:52 GMT References: <25508@gryphon.COM> Organization: AT&T BL Middletown/Lincroft NJ USA Lines: 28 In article <25508@gryphon.COM> ttg@gryphon.COM (Ted Garrett) writes: >I noticed today that a function in my .kshrc is no longer functional. The >basis of it is : > >if [ -w /etc/cron ] >then > ROOT=" root " >else > ROOT="" >fi : >So while this is a correction of a 'bug' in the ksh permissions checking, it's >inconvenient in that I had to search out a file on my system which is actually >owned by root and is read/write only by root. I used /etc/group. > >No biggie, but it may change the way some things get done on your system. What puzzles me, more than the permissions change, is why you're not doing something like: ROOT=" `expr \"\`id\`\" : '[^(]*(\([^)]*\))'`" if [ " root" != "$ROOT" ] ; then ROOT="" ; fi I may well be missing some point of your script, but it seems you're working overly hard to avoid the direct test. john mcmillan -- att!mtune!jcm -- juzz muttering for self, not THEM