This sed expression works, but is there a better way to represent the white space in both the search pattern and replace string?
BRANCHTAG=7.17.9-main-5ee3e99d5ff002862d93728d821461033de1186d
PRIOR_VERSION=7.17.4
clear; sed "s/^ newTag: 7.17.4${PRIOR_VERSION}.*$/ newTag: ${BRANCHTAG}/" kustomization.yaml
I cannot just search on newTag as that would replace all newTag strings in the file