Article View: comp.unix
Article #362Re: Redirection
From: Steven Freed CIRT
Date: Thu, 27 Dec 1990 16:44
Date: Thu, 27 Dec 1990 16:44
19 lines
905 bytes
905 bytes
>%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
Technical Details
Message-ID:
<2311@megadon.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!olivea!oliveb!amdahl!altos!megadon!clpReferences:
<2307@megadon.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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