On Tue, Feb 10, 2009 at 5:13 PM, Gus Vincent Dato <[email protected]> wrote: > hi guys, > > how do i parse a file, searching for a certain string like... example of the > contents of the file would be... > > [ENGINE] > Name=SIC > Version=12.102.1009 > > and i wanted to search for 'Version' and retrieve what it points which is > '12.102.1009'. > > and also replace the the contents of the version to something linke > '13.0.0'... should be something like this...
> Name=SIC > Version=13.0.0 > > really appreciate you help. > > thanks. There is a tool called "sed" that it main job to search a text pattern and replace it you can use the sed expression for this situation " sed 's/Version=12.102.1009/Version=13.0.0/' yourTextFile" it will work
