Thanks for suggestions everyone.  This is the best solution because it's 
clearly understandable and readable, doesn't have any external dependencies 
(like possibly unavailable or varying versions of perl/awk/sed/python)


PERM=`stat -c '%a' /etc/resolv.conf`
let OWRITABLE="8#$PERM & 8#002"
let GWRITABLE="8#$PERM & 8#020"
if [ $OWRITABLE -ne 0 -o $GWRITABLE -ne 0 ] ; then
...
fi


_______________________________________________
Tech mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to