Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3).
Navigation
Topics Help • Register • News • History • How to • Sequences statistics • Template prototypes

Difference between revisions of "Splitting a sieve file"

From Prime-Wiki
Jump to: navigation, search
(new)
(No difference)

Revision as of 09:42, 24 December 2018

Description

splitting a sieve file in PRP-LLR format into a number of seperate files using awk.

Needed software

  • ASCII editor
  • awk.exe

Example

Split the sieve file t16_b999.prp into 4 separate files.

Preparation WIN

  • copy gawk.exe in a folder
  • create a file named split.awk with this code:
BEGIN{getline line; i=1}
 {if (head[i] == 0)
  {print line >>i".pfgw"
    head[i]=1
  }
  print $0 >>i".pfgw"
  i++
  if (i==5) i=1
 }
  • copy the sieve file in this folder (for example t16_b999.prp
  • calling gawk -f do.awk t16_b999.prp

Results:

  • creates 4 files 1.pfgw to 4.pfgw with equally splitted candidates sorted by n