On Tue, Nov 17, 2009 at 2:05 PM, Sameer Oak <[email protected]> wrote: > ALL, > > I need help with a particular sed pattern. > > I am maintaining a version file wherein I need to search for a line that > starts with "build_number_i". > Following are the contents of the file: > build_type_i=i > build_number_i=1 > branch_name_i=trunk > build_id=1 > > Each line is of the form <variable_name>=<value> > > I want to increment value of variables "build_number" and "build_id" by 1. > > How can I achieve it with sed?
I would say sed is not the right tool for this job, although you can do some hacks to increment a number: http://www.gnu.org/software/sed/manual/sed.html#Increment-a-number Vaibhav _______________________________________ Pune GNU/Linux Users Group Mailing List
