command line - Compare 2 text files and display the difference between them (PowerShell or CMD) -


i have 2 text files text1.txt contains:

fc1/1 storage fc1/5 switch fc1/7 replication 

text2.txt contains:

fc1/1 storage fc1/5 nas fc1/7 replication 

i want script compares 2 text files , generate text found on text2.txt not on text1.txt in text file named difference.txt

difference.txt contains

fc1/5 nas 

any ideas?

maybe ...

findstr /v /g:text1.txt text2.txt  > difference.txt 

search text2.txt lines not matching (/v) lines in text1.txt


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -