yeah I will continue trying to write a proper program as I may have to do it again. At the moment it’s just 2 76mb text files and once they are done that is it. Well I then have to do a load of other calcs with the data. But first I need to reduce the data by at least 9/10ths as the sample rate was too high.
Don’t have any C++ or VB software on this PC as it’s been a looooong time since I used either of them.
I’d use Ruby or Perl, be quicker and less crap to install.
Learning Ruby at the moment, so the following probably isn’t very good Ruby programming. Works, though 🙂
1. Save to a text file (e.g. skip_lines.rb)
2. Run as skip_lines <inputfile> <outputfile> <lines to skip>
def foo(infile, outfile, lines)
f = File.open(infile, "r")
f2 = File.open(outfile, "w")
counter = 0
f.each_line do|line|
f2.write(line) if (counter % lines.to_i == 0)
counter = counter +1
end
f.close
f2.close
end
foo ARGV[0], ARGV[1], ARGV[2]