Wipe off the text after a certain keyword
Posted: Sat Jul 04, 2009 2:24 am
I have a file with these lines
+ G G Dandekar Machine B 69.05 76.05 + 10.14
+ Meghmani Organics Lt B 13.00 14.30 + 10.00
+ Nagpur Power B 35.00 38.50 + 10.00
+ Geodesic Ltd B 96.35 105.90 + 9.91
+ Roselabs Industries B 10.80 11.75 + 8.80
What I want to do is that wherever I am getting " B " I want to replace the text after that(including B)
so that the final file looks like this
+ G G Dandekar Machine
+ Meghmani Organics Lt
+ Nagpur Power
+ Geodesic Ltd
+ Roselabs Industries B 10.80 11.75 + 8.80
How can this be achieved?
Thanks
+ G G Dandekar Machine B 69.05 76.05 + 10.14
+ Meghmani Organics Lt B 13.00 14.30 + 10.00
+ Nagpur Power B 35.00 38.50 + 10.00
+ Geodesic Ltd B 96.35 105.90 + 9.91
+ Roselabs Industries B 10.80 11.75 + 8.80
What I want to do is that wherever I am getting " B " I want to replace the text after that(including B)
so that the final file looks like this
+ G G Dandekar Machine
+ Meghmani Organics Lt
+ Nagpur Power
+ Geodesic Ltd
+ Roselabs Industries B 10.80 11.75 + 8.80
How can this be achieved?
Thanks