What I am looking to do is find a match and then replace everything after character in the next line.
Example file contents:
super_service:
app_version: 1.02
duper_service:
app_version: 4.0.1
happy_service:
app_version: 2.03
turbo_service:
app_version: 1.28.0
Expected outcome: What I am looking to do is match duper_service for example, and then replace everything after its' "app_version: " with a new version I define, 4.0.2 for example. I am able to do this with awk but need to write the change to the file.
cp originalFile original.back && awk '{ .... }' originalFile > output.tmp && mv output.tmp originalFile
– αғsнιη Apr 26 '21 at 23:08