Hi!
I have a difficult problem, to step up a unknown version number in a text file, and save the file. It would be great to run script.sh and the version gets increased.
Example the content of the textfile.txt
hello
version = x
bye
This include three steps
- First find the char after "version =" e.g 5
- Convert? the 5 to a integer and increase the value with 1, in this case result is 6
- Replace the 5 with a 6
- save the file
I understand this is a VERY difficult problem, if you can in any way it would be great, i tried with SED earlyer, but got stuck.
Thanks in advance
Beachboy72