File: find-replace.ps1

package info (click to toggle)
liblouis 3.36.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 86,248 kB
  • sloc: ansic: 37,162; makefile: 1,298; python: 772; lisp: 390; sh: 339; perl: 221; cpp: 21
file content (12 lines) | stat: -rw-r--r-- 237 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
# Simple sed-like utility script

Param(
  [string]$InputFile,
  [string]$OutputFile,
  [string]$Str1,
  [string]$Str2
)

Get-Content $InputFile |
%{ $_ -Replace $Str1,$Str2 } |
Out-File $OutputFile -Encoding UTF8 -Width 256