WHY 当前离线
上校
$s = [IO.File]::ReadAllText('a.txt', [Text.Encoding]::Default); ([regex]('(?i)' + [regex]::Escape("Here's your [Keyword]") + '[^\r\n]*')).Replace($s, '$&ABC', 1) > b.txt复制代码
TOP
gawk "{if($0~/Here's your \[Keyword]/ && !a){a=1;$0=$0\"ABC\"}};1" a.txt > b.txt复制代码