Skip to content

Instantly share code, notes, and snippets.

@tcshao
Last active October 11, 2015 02:48
Show Gist options
  • Select an option

  • Save tcshao/3790764 to your computer and use it in GitHub Desktop.

Select an option

Save tcshao/3790764 to your computer and use it in GitHub Desktop.
Simple powershell loop and replace
<# 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