util
Class LineReduce
java.lang.Object
util.LineReduce
public class LineReduce
- extends Object
A class to reduce the number of lines in an ascii-file. This is useful if
you have data-files with a huge amount of lines and only little
changes. Then you can use this class, provide the file name of the data
file and a drop rate on the command line and see your dispensable data
vanish. The drop rate defines the number of data lines that are ignored.
A drop rate of nine means that only each 10th line is dumped to
standard out.
|
Method Summary |
static void |
main(String[] arg)
Takes the file name of an ascii file as first argument. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LineReduce
public LineReduce()
main
public static void main(String[] arg)
throws IOException
- Takes the file name of an ascii file as first argument. The optional
second argument is a drop rate, i.e. only each n+1-th data line is
dumped to standard out. If the drop rate is missing, zero is adopted,
meaning each line of the file is put out.
- Throws:
IOException