[TAG] More on filtering in-place
androflux at softhome.net
Thu Apr 15 21:17:05 MSD 2004
On Thu, 15 Apr 2004 11:39:28 +0530,
"Kapil Hari Paranjape" <kapil at imsc.res.in> wrote:
> On Wed, Apr 14, 2004 at 04:31:42PM -0600, Jason Creighton wrote:
> > What's happened here is that the output from the filter is not as big as
> > the file itself, so there's "leftover" data hanging around if you're
> > (for example) removing things from the file. This could cause problems
> > in some cases.
> Actually, this is a problem with my original "solution" as well.
That occured to me. (*after* I posted my message, of course)
> > But I'm curious: How does this work at all? What, exactly, does
> > [it] tell the shell?
> '< file' says open "file" in read mode and call it file-descriptor 0 (=stdin)
> '1<> file' says open "file" in read/write mode (means notrunc open)
> and call it file-descriptor 1 (=stdout)
Cool, I didn't know this. (Well, obviously, otherwise I wouldn't be
asking what it does.)
More information about the TAG