How can i delete nth line of a txt file?
Show older comments
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
on 27 Feb 2014
are you on windows, mac or Linux? Linux has some awesome text file edit tools..
Answers (1)
Azzi Abdelmalek
on 27 Feb 2014
0 votes
Load all the lines then delete the specific lines
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!