Quantcast
Channel: umask does not have -S option - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by Stéphane Chazelas for umask does not have -S option

$
0
0

Since umask changes the internal state of the shell, it has to be a shell builtin.

POSIX shells umask builtin have a -S option as that's a POSIX requirement, but csh's doesn't. Your umask man page documents the umask builtin of bash, not that of csh. Check the csh man page for the documentation of its umask builtin.

There's no good reason why you'd want to use csh in this century, especially on a GNU/Linux system, but if you have to, you can always do:

sh -c 'umask -S'

to report a symbolic form of that umask.

That would report the umask of the the child process executing sh, but since the umask is inherited upon fork and preserved across exec, that should be the same as csh's umask.

In any case, that returned umask won't be useful to csh, as csh's umask builtin doesn't support symbolic forms.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>