Last active
October 11, 2015 02:48
-
-
Save tcshao/3790764 to your computer and use it in GitHub Desktop.
Simple powershell loop and replace
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
| <# Loop through IRC log File #> | |
| $quotes = @() | |
| $dest = 'out.txt' | |
| Get-Content in.txt | % { | |
| $line = $_ -replace '.*?[0-9]:','' | |
| $line = $line -replace '"','' | |
| $quotes += $line | |
| } | |
| $quotes | Set-Content $dest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment