Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!olivea!oliveb!amdahl!altos!megadon!clp From: sfreed@ariel.unm.edu (Steven Freed CIRT) Newsgroups: comp.unix Subject: Re: Redirection Keywords: wc Message-ID: <2311@megadon.UUCP> Date: 27 Dec 90 16:44:34 GMT References: <2307@megadon.UUCP> Sender: clp@megadon.UUCP Followup-To: sfreed@ariel.unm.edu Organization: University of New Mexico, Albuquerque NM Lines: 19 Approved: clp@megadon.UUCP Apparently-To: comp-unix@gatech.edu >%wc myfile > 3 6 36 myfile > >%wc myfile > myfile >%cat myfile > 0 0 0 myfile > >How come MYFILE becomes that? because the original "myfile" gets overwritten by the new "myfile" (from the redirection) by the shell BEFORE wc is run, therefore, the only thing wc sees is an empty file. -- Thanks, Steve. sfreed@ariel.unm.edu