I have abc.txt file that has below entries. I would like to replace substring of the sentence that begins with "test" after the second colon (:) with given value.
Tried below:
echo test:abc.io/gng-cp:1.34.2-of1231 | sed 's/\([^test:]*:\).*/\11.333.555/g'
But it is giving:
test:1.333.555
Expected was:
test:abc.io/gng-cp:1.333.555
Input is:
abc.txt
=======
jnu
mango
vim
test:abc.io/gng-cp:1.34.2-of1231
Appreciate inputs on how to fix this?