Created
November 4, 2020 21:27
-
-
Save musukvl/e79d1fdf6054c6962c1f971a1b143a7f to your computer and use it in GitHub Desktop.
PowerShell: Replace text in multiple files
This file contains 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
ls ./SqlScripts/*.sql | %{$f = $_; (gc $f.PSPath) | %{$_ -replace "SET @ENV = ''", "SET @ENV = 'TEST'"} | sc $f.PSPath } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment