我有一个hocon文件,其中包含以下文本,我要取消注释其中包含CPU的行
// Size of buffer for events waiting to be processed by the fetcher. Typically, this should
// be at least 3-4x number of cores to ensure that the processing pipeline is making use of
// all available CPUs and it is always running maxFetcherBufferSize: 100
你可以这样
sed -r '/CPU/{s/[^//]*\/\/\b*(.*)/\1/}' filename
如果要在适当位置编辑文件,请使用-i选项。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句