Created
July 11, 2015 04:16
-
-
Save kaito834/575d757f1fb2d3bc9178 to your computer and use it in GitHub Desktop.
Compare two files on Windows instead of "diff" command; "fc" command or Compare-Object cmdlet
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
$>type diff-test_a.txt | |
This is test string. | |
hoge fuga. | |
This is test. | |
$>type diff-test_b.txt | |
This is test string. | |
This is test. | |
$>fc /N diff-test_a.txt diff-test_b.txt | |
ファイル diff-test_a.txt と DIFF-TEST_B.TXT を比較しています | |
***** diff-test_a.txt | |
1: This is test string. | |
2: hoge fuga. | |
3: | |
4: | |
***** DIFF-TEST_B.TXT | |
1: This is test string. | |
2: | |
***** | |
$>powershell | |
Windows PowerShell | |
Copyright (C) 2014 Microsoft Corporation. All rights reserved. | |
PS > Compare-Object (Get-Content .\diff-test_a.txt) (Get-Content .\diff-test_b.txt) | |
InputObject SideIndicator | |
----------- ------------- | |
hoge fuga. <= | |
<= | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment