Re: [SLUG] Slicing a file

From: Eben King (eben1@tampabay.rr.com)
Date: Fri May 26 2006 - 13:38:38 EDT


On Fri, 26 May 2006, Daniel Jarboe wrote:

> On 5/26/06, Eben King <eben1@tampabay.rr.com> wrote:
>> If line 2000 et al should be the first line of the next segment (not the
>> last line of the previous one), you need
>>
>> sed '1,1999!d' original > result1
>> sed '2000,4999!d' original > result2
>> sed '5000,7999!d' original > result3
>> sed '8000,10000!d' original > result4
>
> Eben, you might be confusing the issue here. Paul's example was
> 2000,3000,3000,2000, not 1999,3000,3000,2001

Right, the proposition was N lines in seg [1-3], not that the Nth line
starts seg [2-4]. Never mind.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
AQUARIUS:  There's travel in your future when your tongue freezes to the
back of a speeding bus.  Fill the void in your pathetic life by playing
Whack-a-Mole 17 hours a day.  -- Weird Al, _Your Horoscope for Today_
-----------------------------------------------------------------------
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:24:50 EDT