Oh, yeah, both of those are awk scripts. You could do it with sed as well, of course, but I don't know the bitwise operators in sed.
No, it doesn't check - but it's a bitwise or, so nothing should change if the bit is set already (or isn't set already, depending.)
If you add something like:
Code:
if (and($3,mask)==mask){print mask " already set at " $2;}
It'll check bitmasks as well.