The umask program
umask changes its file mode creation mask, then executes a program. Alternatively, it can print the current mask.
Interface
umask [ -S ] [ mask ] [ prog... ]
When called with no argument, umask prints the value of the file mode creation mask of the invoking process, then exits 0.
When called with a mask argument, umask changes its file mode creation mask; then, if prog... is not empty, it execs into it.
umask interprets mask as specified by the POSIX specification for a umask external utility.
Notes
- umask fully conforms to the POSIX specification. When prog... is not empty, the behaviour of a umask utility is not specified by POSIX, so umask extends the spec to be actually useful and usable in an execline program.
