FIND YOUR NEXT FEW LINES
Results for “mask”
Small, practical examples. Search by task or narrow things down below.
7 snippets foundClear filters
Create private files with a restrictive umask
Linux Commands: Apply umask in a subshell so the surrounding shell is unaffected.
Linux Commands✓ Tested
Require every bit in a mask
Arduino / C: Masking followed by equality tests whether all required flags are set.
Arduino / C✓ Tested
Toggle a bit with an XOR mask
Arduino / C: XOR flips selected bits and leaves all other bits unchanged.
Arduino / C✓ Tested
Set and clear a bit in a shell integer
Bash Scripts: Use shifts and bitwise operators for a small flag field.
Bash Scripts✓ Tested
Drop all optional Linux capabilities
Docker / Compose: The effective capability mask becomes zero after cap-drop ALL.
Docker / Compose✓ Tested
Pack two small values into one byte
Arduino / C: Mask each four-bit value before combining it.
Arduino / C✓ Tested
Set and test bit flags
Use unsigned masks to combine and test C flags.
C✓ Tested