-1

i need to delete or remove first 6 lines of this file(give below is my input file) and write the remaining in a seperate text file?how can i do that....

[S:00]
{org:en}
I called the number and the lady told me she was talking on the phone to Toby Studabaker,'' Sherry Studabaker told BBC television.

{/org}
{unl}
agt(call(icl>do,equ>dial,plt>thing,plf>thing,agt>volitional_thing,rec>thing).@entry.@past,i(icl>person):01)
and(:01,call(icl>do,equ>dial,plt>thing,plf>thing,agt>volitional_thing,rec>thing).@entry.@past)
rec(call(icl>do,equ>dial,plt>thing,plf>thing,agt>volitional_thing,rec>thing).@entry.@past,number(icl>abstract_thing,icl>quantity,obj>thing).@def)
agt:01(tell(icl>say>do,cob>uw,agt>person,obj>uw,rec>person):01.@entry.@past,lady(icl>woman>person).@def)
rec:01(tell(icl>say>do,cob>uw,agt>person,obj>uw,rec>person):01.@entry.@past,i(icl>person):02)
agt:02(talk(icl>communicate>do,cob>uw,agt>person,obj>thing,ptn>person).@entry.@past.@progress,she(icl>person))
cob:02(talk(icl>communicate>do,cob>uw,agt>person,obj>thing,ptn>person).@entry.@past.@progress,phone(icl>electronic_equipment>thing,equ>telephone).@def)
ptn:02(talk(icl>communicate>do,cob>uw,agt>person,obj>thing,ptn>person).@entry.@past.@progress,toby)
nam:02(toby,studabaker:01)
agt:03(tell(icl>say>do,cob>uw,agt>person,obj>uw,rec>person):02.@past,sherry(icl>fortified_wine>thing).@maiuscul)
nam:03(sherry(icl>fortified_wine>thing).@maiuscul,studabaker:02)
rec:03(tell(icl>say>do,cob>uw,agt>person,obj>uw,rec>person):02.@past,bbc(iof>organization))
obj:03(tell(icl>say>do,cob>uw,agt>person,obj>uw,rec>person):02.@past,television(icl>broadcasting>thing))
and(tell(icl>say>do,cob>uw,agt>person,obj>uw,rec>person):02.@past,:02)
obj:01(tell(icl>say>do,cob>uw,agt>person,obj>uw,rec>person):01.@entry.@past,:03)
{/unl}
saranya
  • 85
  • 8
  • http://stackoverflow.com/questions/1377279/java-find-a-line-in-a-file-and-remove and you need some tinkering work to achieve your need. – vels4j Oct 31 '13 at 09:37

1 Answers1

1

How do you do that?

  open input file
  open output file
  repeat:
      read line
      is line number greater than 6?
         write line
  until EOF
  close files

Now code it in Java.


There is no clever way to do this in Java, and I'm not aware of any 3rd party libraries that would significantly simplify this (already very simple) problem.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • StackOverflow is not intended to be a "write code for free" service ... and I'm not willing to indulge you. – Stephen C Oct 31 '13 at 09:33
  • i am also not intersted to get code for free...i dont have idea to do this.....thats y i have asked for the step or pseudocode.i am working on the steps that was give in last post.... – saranya Oct 31 '13 at 09:49