{
"name": "light.loc",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"serve": "browser-sync start --server 'app' --files 'app/index.html, app/css/main.css, app/js/main.js'",
"watch:css": "onchange 'app/css/main.css'",
"watch:js": "onchange 'app/js/main.js'"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"onchange": "^7.1.0",
"parallelshell": "^3.0.2"
}
}
$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'