UNB/ CS/ David Bremner/ teaching/ java/ NumberLines2.java
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileWriter;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintWriter;
public class NumberLines2{

    public static void main(String [] args) throws IOException{
        BufferedReader in=new BufferedReader(new FileReader(args[0]));
        PrintWriter out=new PrintWriter(new FileWriter(args[1]));
        int counter=1;
        String inLine=in.readLine();
        while (inLine!=null){
            out.print(counter);
            counter++;
            out.println(" "+inLine);
            inLine=in.readLine();
        }
        out.close();
    }



}
//