Edward Ned Harvey (lopser) wrote [edited]: > If using "stat" you can also get the perms in 755 format. From here, > I can easily do a bitwise & with 2, and I can easily find the world > write bit. But bash arithmetic doesn't view the number "755" in octal... > It operates decimal.
Changing 755 to either 0755 or 8#755 makes bash treat it as octal. So, use "stat --format 0%a" or "stat --format 8#%a" and simply do & 2. -- -- zvr -- -- +---------------------------+ Alexios Zavras (-zvr-) | H eytyxia den exei enoxes | z...@zvr.gr +-----------------------zvr-+ _______________________________________________ Tech mailing list Tech@lists.lopsa.org https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/