Created
October 8, 2012 20:29
-
-
Save mshock/3854782 to your computer and use it in GitHub Desktop.
Powershell diff
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
# emulate Unix diff command w/ Powershell script | |
# usage: ps_diff.ps1 red_fish.txt blue_fish.txt [logpath] | |
$diff = compare-object (get-content $args[0]) (get-content $args[1]) | |
if ($args[2] -eq $null) {write-output $diff} | |
else {add-content $args[2] $diff} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment