Last active
January 22, 2021 14:09
-
-
Save MartinMiles/58b64ff62b880447099e82cd5415924c to your computer and use it in GitHub Desktop.
One-liner recursively replace content in files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gci -r -include "*.yml","*.xml" | foreach-object { $a = $_.fullname; ( get-content $a -Encoding UTF8) | foreach-object { $_ -replace "FROM VALUE","TO VALUE" } | set-content $a -Encoding UTF8} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment