pwsh sed


$config="a:/etc/data.xml"

$fromString='<property="suggesterConfig">'
$toString = '<property="suggesterConfig"> <void property="oknow"> <boolean>false</boolean> </void>'


(Get-Content $config).replace($fromString, $toString) | Set-Content $config

(Get-Content -path .\DEPS -Raw) -replace "'checkout_samples': True", "'checkout_samples': False" | Set-Content -path .\DEPS
posted @ 2023-06-22 08:12  fndefbwefsowpvqfx  阅读(8)  评论(0编辑  收藏  举报