Redirection
Thomas Kwong
6600tom at ucsbuxa.ucsb.edu
Thu Dec 27 11:31:53 AEST 1990
In the final exam ( Unix and C ) that I just take, one UNIX
problem is like this:
%cat myfile
word1 word2 word3
word4 word5
word6
%wc myfile
3 6 36 myfile
%wc myfile > myfile
%cat myfile
0 0 0 myfile
How come MYFILE becomes that?
I think it should be like:
3 6 36 myfile
because output of wc myfile is redirected to myfile.
Can anybody tell me why?
Thomas Kwong.
------------------------------ 6600tom at ucsbuxa.ucsb.edu
More information about the Comp.unix
mailing list