misc: powershell compare-object to compare text files...
i guess i'm hooked because here i am again writing about this stuff. anyway, this was just too cool to pass up. using one line, you can compare two text files:
compare-object $(get-content file1.txt) $(get-content file2.txt)
didn't say the stuff was complicated. :)
I am trying to compare two files with about 20,00 entries each and it doesnt seem to work. If I compare them in Access, I get 1700 differences. When I compare with Powershell, about 20,00 differences.
ReplyDeleteIs there a limit to the amount of data that can be compared?
There does appear to be a default limit. Check out: http://dmitrysotnikov.wordpress.com/2008/06/06/compare-object-gotcha/
ReplyDeleteHe writes about how to get around the limitation.
you know, i had JUST read that same article earlier this week and meant to go make a comment. thanks garth!
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDelete