Hi Guys,

I need to check the umask setting in /root/.bash_profile to make sure that it's set to 077.

I've started writing a bash script with some perl one liners in, however it would seem that a straight perl script would be more efficent.

Perl isn't my thing, so any perl guru's out there that could give me a hand?

Basic outline is:

If umask is 077, do nothing
if it's there but different change it (or comment out existing and add a new one).
if it's not there, put one in.

If there was a change pop a comment in at the top of the file (Date - umask altered).


Before anyone asks, no it's not home work!