0658デフォルトの名無しさん
2018/04/01(日) 12:23:46.08ID:P1fWuhY2誰だよC#とか言ったアホwwwww
function Update-LastTest ([IO.FileInfo]$file) {
$s = Get-Content $file | Out-String
$s = ($s.TrimEnd() -replace '[^\n]*てすと$', '') + 'てすと'
$s | Out-File $file
}
Update-LastTest (Get-ChildItem ./test.txt)