Carl Lowenstein wrote:
> 
> Yes.  After looking at CFA Johnson's shell script for a while, I sat
> down and wrote an AWK script.  It's not quite ready for prime time. 
> It has the following characteristics:  given a list of files and
> sizes, it reads through the list in sequence from the beginning.  The
> output is a set of smaller lists, each one filled up not to exceed a
> specified maximum size.   Each input item is put into the first
> available output list in which it fits.
> 
> So the output lists are approximately in the same order as the input. 
> Sample input and output available on request, or give me a sample of
> your file lists and I will try running it through this program.

I wrote a perl program that does the exact same thing. It is a first-fit
algorithm. It was designed to fit full dumps onto tapes, so it reads
the input of df(1) to perform its task.

It works rather well.

-john

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to