I have a requirement like I have a file which will be having rows like
424: Josh
1273: Sara Keith
141: Shefali
990: Lang
849: Broc Benedict
566: Victoria
283: Karla Mateos
(Id and Name). When I get a name in params I should open and remove the matching line.Is it possible to open file and grep matching line and remove it in a simple way?
There is
Fileclass in rub which helps you in file operations.Simlar problem is answered here.
How to search file text for a pattern and replace it with a given value