This should take care of this using Powershell. This can be done with simple material cmd.exeand some of the built-in Windows executables, but it would be much deeper and harder to understand.
It will be read in some file and in each line:
- replace
[witha - replace
]witho - replace
|withu
escape-, [, ] | - powershell, ` .
$filename="textfile.txt"
$outputfile="$filename" + ".out"
Get-Content $filename | Foreach-object {
$_ -replace '\[', 'a' `
-replace '\]', 'o' `
-replace '\|', 'u'
} | Set-Content $outputfile
, .
$filenames = @("/path/to/File1.txt", "file2.txt", "file3.txt")
foreach ($file in $filenames) {
$outfile = "$file" + ".out"
Get-Content $file | Foreach-object {
$_ -replace '\[', 'a' `
-replace '\]', 'o' `
-replace '\|', 'u'
} | Set-Content $outfile
}