redirection
From: marko2 (marko2_at_REMOVEistop.com)
Date: 09/10/03
- Next message: James Leifer: "Re: iterating through files with "for f in *""
- Previous message: Ed Morton: "Re: second occurence"
- Next in thread: Barry Margolin: "Re: redirection"
- Reply: Barry Margolin: "Re: redirection"
- Reply: those who know me have no need of my name: "Re: redirection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 10 Sep 2003 11:47:09 -0700
Sometimes I just forget how things work.
Assuming that myfile in both situations has something inside of it.
cat <myfile >myfile
cat myfile
(shows an empty file)
wc <myfile >myfile
cat myfile
0 0 0
How does it work does the shell first read ">myfile" and empty it out, or
does the shell read "<myfile" first, give a word count to wc and then empty
it out with >myfile, producing the output 0 0 0
- Next message: James Leifer: "Re: iterating through files with "for f in *""
- Previous message: Ed Morton: "Re: second occurence"
- Next in thread: Barry Margolin: "Re: redirection"
- Reply: Barry Margolin: "Re: redirection"
- Reply: those who know me have no need of my name: "Re: redirection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|