How to modify lines in a file in-place?

0 votes
99 views
asked Apr 26, 2016 by Hitesh Garg (132 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.

Welcome to Codingeek Q&A, where you can ask questions and receive answers from other members of the community.
...