我有一个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
答案 0 :(得分:1)
你可以这样做
sed -r '/CPU/{s/[^//]*\/\/\b*(.*)/\1/}' filename
如果您要编辑文件,请使用 -i 选项。