$pairs = Import-Csv csvfile.txt
$filecontent = Get-Content -Path file.txt
$filecontent | Foreach-Object {
foreach ($pair in $pairs) {
$_ -replace $pair.oldword, $pair.newword
}
} |
Set-Content -Path file.txt
(get-content file.txt -raw) -replace "1","2" -replace "3","4" -replace "5","6" | out-file file.txt
(Get-Content -Path 'path') | ForEach-Object {
>> $_ -replace 'oldWord', 'newWord'
>> } |
>> ForEach-Object {
>> $_ -replace 'oldWord2', 'newWord2'
>> } | Set-Content 'path'