Loading ...
Sorry, an error occurred while loading the content.

Call for filter-file utilities

Expand Messages
  • Phil Carmody
    I m sure many of us deal with large filter files and have to do tedious file operations on them to split or recombine files, or merge them, or filter them or
    Message 1 of 1 , Nov 2, 2001
    • 0 Attachment
      I'm sure many of us deal with large filter files and have to do tedious file operations on them to split or recombine files, or merge them, or filter them or whatever. Now I know the Unix gurus simply rattle off grep, sed, awk, and Perl command lines at a whim, but not everyone's that sad. So I hereby open the Prime Numbers files area - 'Filter File Utilities' folder to those little programs that you can't do without, and are just dying to share! :-)

      As a starter, I have just uploaded a quickie called 'extract' which reads a NewPGen/PRP/PFGW/whatever[*] filter file, does a modular filter, and optionally a bounds chop.

      e.g.
      extract 30 1 < 12345plus.fil > 12345plus30_1.fil
      will extract all the lines with k-numbers of the form 30a+1

      extract 30 1 100000 200000 < a.fil > b.fil
      does similar except that it only passes line that are in the
      given range

      Of course, as I write this I am thinking of other things it could be doing, but that's what's there for starters.

      A Windows .exe and C source are provided. I really don't know what the "stdafx" nonsense is, but MSVC put it in and barfed when I tried to remove it!

      Anyway, having been sullied by a MS product, I must now go and atone myself by writing some obfuscated perl...

      Enjoy,
      Phil

      [* anything with one line of header and the number to filter on is the first thing on following lines]

      Mathematics should not have to involve martyrdom;
      Support Eric Weisstein, see http://mathworld.wolfram.com
      Find the best deals on the web at AltaVista Shopping!
      http://www.shopping.altavista.com
    Your message has been successfully submitted and would be delivered to recipients shortly.