现在有形如如下的类json
com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.BackgroundModes = { enabled = 1; }; com.apple.Push = { enabled = 1; };
如何把某一个enabled关掉呢?
sed -i "" "/com.apple.Push = {/,/}/{s/enabled = 1;/enabled = 0;/;}" file
现在有形如如下的类json
com.apple.ApplicationGroups.iOS = { enabled = 0; }; com.apple.BackgroundModes = { enabled = 1; }; com.apple.Push = { enabled = 1; };
如何把某一个enabled关掉呢?
sed -i "" "/com.apple.Push = {/,/}/{s/enabled = 1;/enabled = 0;/;}" file