更新时间:2022-11-22 13:17:33
您可以使用 change 命令替换整行,并使用 -i
标志使就地更改.例如,使用 GNU sed:
You can use the change command to replace the entire line, and the -i
flag to make the changes in-place. For example, using GNU sed:
sed -i '/TEXT_TO_BE_REPLACED/c\This line is removed by the admin.' /tmp/foo