I have a json file with a line as below,
"image": "docker.abc.com/abc-pr0000abc:ABCCoreUI-46",
Can some one help me with sed command that can replace above as below,
"image": "docker.abc.com/abc-pr0000abc:ABCCoreUI-47",
Also I would like to wild card 46, something like ABCCoreUI-*
I tried sed s/ABCCoreUI-4*/ABCCoreUI-47/ file.json
Output become,
"image": "docker.abc.com/abc-pr0000abc:ABCCoreUI-4742",
Thanks
xxx
s static obfuscated strings, or are they different in every instance you wish to alter?*
means any 0 or more of previous atom (character or bracketed thing). You are mixing it up with globs. Just replacing your*
with.*
should do it. (.
means any character[.]
or\.
means.
).