How can i delete nth line of a txt file?

1 view (last 30 days)
anthrax
anthrax on 27 Feb 2014
Commented: Thomas on 27 Feb 2014
Hello,
I have a txt file and there are almost 16k lines inside of it. I wanna delete specific lines for example 1st, 5th, 178th, 2999th etc. I dont need to search anything, i know which lines be deleted.
I searched a little bit about it but i couldn't understand them. Actually i havent dealed with those txt and data stuff and i have literally no idea how to do it, so your help should be at for dummies level.
Thanks in advance.
  1 Comment
Thomas
Thomas on 27 Feb 2014
are you on windows, mac or Linux? Linux has some awesome text file edit tools..

Sign in to comment.

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 27 Feb 2014
Load all the lines then delete the specific lines

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!