【发布时间】:2022-01-22 07:49:53
【问题描述】:
我在使用 SED 时遇到问题
我要替换的东西:
image: thing:1.2.3
我想要的:
image: myrepo/folder1/folder2/opensource/thing/thing:1.2.3
我得到了什么:
image: myrepo/folder1/folder2/opensource/thing/ thing:1.2.3
我在做什么:
sed -e 's/image:\s/image:\ myrepo\/folder1\/folder2\/opensource\/thing\//' thing-deployment.yaml > thing-deployment.yaml.UPDATED
我想我已经接近了,但我错过了一些东西。请问是什么?
【问题讨论】:
-
awk '$2 = "myrepo/folder1/folder2/opensource/thing/" $2'
标签: sed