import java.io.*; class SubLineNum{ public static void main(String []sss){ try{ BufferedReader bf = new BufferedReader(new FileReader("c.txt")); FileWriter fw = new FileWriter("d .txt"); String line = null; StringBuffer sb = new StringBuffer (); while((line = bf.readLine())!=null){ String lin = line.substring(line.indexOf(" ")+1)+"\t\n"; fw.write(lin,0,lin.length()); } fw.flush(); fw.close(); }catch(IOException ex){ ex.printStackTrace(); } } }