i have a project and it wants from me to take the commands from file
such
>> search -to -name Dubya Lilith
we have to take this command from file.
Example descripton
>> java MyProject input1.dat input2.dat
Begin Transaction Log
4 records are added to transaction table:
Record 1: 12.10.2007; +90 (532) 5555555; +1 (841) 4444444
Record 2: 14.10.2007; +1 (841) 4444444; +90 (542) 3333333
Record 3: 14.10.2007; +90 (532) 5555555; +90 (532) 1111111
Record 4: 20.10.2007; +90 (532) 1111111; +90 (532) 5555555
End of Transaction Log
Begin Owner Log
4 records are added to owner table, 0 ignored, 0 overridden :
Record 1: John Michael Moore; +90 (532) 5555555
Record 2: Dubya Bush; +1 (841) 4444444
Record 3: George Erdogan; +90 (542) 3333333
Record 4: Abdullah Kaktus; +90 (532) 1111111
End of Owner Log
>> search -to -name Dubya Bush
On 12.10.2007 From: John Michael Moore To: Dubya Bush
my project is that we will take inputs from file and commands too.
input1.dat has transactions and input2.dat has phone number owners.
we will output results in another file query.dat
Roedy Green - 28 Nov 2007 05:59 GMT
>Record 1: 12.10.2007; +90 (532) 5555555; +1 (841) 4444444
You first problem is to read this. you might do it with readLine and
regex split, and a little indexOf to filter out junk.
see http://mindprod.com/applet/fileio.html for how to read the lines.
see http://mindprod.com/jgloss/regex.html#SPLIT for how to split the
lines up.
see http://mindprod.com/jgloss/string.html for misc string methods.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com