更新时间:2023-11-15 15:52:04
这将适用于值中的一个或不带引号的 part (带引号的部分前后都有未引号的部分):
This will work for one or none quoted part in the value (unquoted parts before and after the quoted part):
sed -i '/software/ s/setting:[^,"]*("[^"]*")?[^,"]*,/setting:,/' $fileName