bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linecut development


From: John Cowan
Subject: Re: linecut development
Date: Sat, 13 Oct 2007 13:37:48 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Steven Schubiger scripsit:

>  a) allocate memory for each line and buffer accordingly

That won't work, because the input size is unlimited and memory is not.
You need to be able to fall back to disk.

>  b) disallow inverted (relative to EOF) line positions

That's insufficient too; just allowing out-of-order ranges means
that some kind of buffering will be needed.

The only safe strategy is to do what "sort" does, and copy the input
to a disk file.

-- 
Why are well-meaning Westerners so concerned that   John Cowan
the opening of a Colonel Sanders in Beijing means   address@hidden
the end of Chinese culture? [...]  We have had      http://www.ccil.org/~cowan
Chinese restaurants in America for over a century,
and it hasn't made us Chinese.  On the contrary,
we obliged the Chinese to invent chop suey.            --Marshall Sahlins




reply via email to

[Prev in Thread] Current Thread [Next in Thread]