0

I have a large EBCDIC file which can be between 100mb to 900mb. Each line has a fixed lenght of 499 chars. At the end of the line is one byte hex(0A) which represents RPT = line feed. The first two rows differ from the 499 char fixed lenght.

What is the most performant way to iterate over all lines and output each line, which is not exact 499 chars (in any language, bash prefered).

Thanks very much!

4

1 回答 1

3

How about short perl script:

#!/bin/perl
while(<STDIN>){
 if(length($_)!=499){
  print $_;
 }
}
于 2013-10-15T21:53:35.200 回答