[SLUG] Slicing a file

From: Paul M Foster (paulf@quillandmouse.com)
Date: Fri May 26 2006 - 01:07:26 EDT


Here's what I need to do (sometimes): Take a text file and split it into
  pieces. The split command won't work for this, because the pieces may
not be equal. For example, I may want to split an 8000 line file into
pieces 2000, 3000 and 3000 lines each. I'm willing to run the same
command multiple times with different parameters, but whatever I use
needs to be some common command expected to be there on any system. I've
looked at split, head and tail. I suspect I can do this with sed or awk,
but I'm not very familiar with those two, beyond rudimentary use. Can
anyone suggest a solution?

Paul

-- 
Paul M. Foster
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:21:36 EDT