On Wed, Nov 23, 2011 at 9:59 PM, Cook, Malcolm <[email protected]> wrote:

> Also, I've wanted to be able to define blocks in terms of number of lines.  
> For instance, fastq format has new record every 4 lines.  Is there a way to 
> block on line number. (candidate blocks are where the line number is 
> divisible by 4).

So what you want is to define a record as a 4 line record. It could be
something like:

  --record 4l # 4lines
  --record 4 # 4bytes
  --record 4k # 4000bytes
  --record 4kl # 4000lines

Try this for now:

cat big | perl -pe '($.-1)%4 or print "SePaRaToR"' | parallel --pipe
--recstart SePaRaToR --rrs do_stuff

Performancewise it will be very similar if implemented. Is that fast enough?


/Ole

Reply via email to