Hi there, i want to know how to get java to read a file that i will call from unix command line, do something with it and the n output the results.
the furthest i have got in what you do is to put the class
import java.io.*;
in at the beginning.
I want to read in a file, assign each column in the line to a variable
i.e if i was using perl it would be
Code:
while (my $line = <>) { // while there is input from file
chomp $line; // take off trailing space
($a, $b, $c, $d) = split ("\t", $line); // 4 things are split by tabs on each line, put them into these variables
print "$a\t$c\n"; // print first and third col
}