I started to learn KSH
I am doing some exercises from the book
$ umask =rx, u+w
$ print Keep track of everythine > file1.out
$ print Be careful >> file1.out
ksh: file1.out: cannot create [Permission denied]
$ umask -S
u=,g=,o=
$ set -o | tee tee.out | grep ignoreeof
ignoreeof off
$ grep monitor < tee.out
ksh: tee.out: cannot open [Permission denied]
$ print ~me | grep me | cat >> file1.out
ksh: file1.out: cannot create [Permission denied]
$ print *.out
file1.out tee.out
$ /usr/bin/grep track *.out | wc
grep: can't open file1.out
grep: can't open tee.out
0 0 0
$ grep track < f*out | wc
ksh: file1.out: cannot open [Permission denied]
0 0 0
$ time sleep 20 > /dev/null 2>&1
real 0m20.02s
user 0m0.00s
sys 0m0.00s
I see I can do much with files I created because of umask is set to 022. But interesting is I can create new files (example with tee command). Why I can do this if my umask is 022 ?