How to modify lines in a file in-place?

0 votes
asked Apr 25, 2016 by Hitesh Garg (799 points)  

I want to parse a file, edit it by removing trailing spaces from every line and finally save the updated file. Is it possible to edit a line in-place while reading and updating the files?

Please log in or register to answer this question.