Is there anyway to run diff on terminal to find identical data. For example let's say I have two files of e-mails. My boss wants me to find which e-mails overlap in both files. How do i run this diff in terminal?
Moved post to it's own thread. Please don't post new questions on unrelated 3 yr old threads. People tend to notice that when they open it up and pass on responding. Thanks
Have to assume you are running some kind of script. Check $status immediately upon return. Also, I think you'll want to use '-q' to limit differences that are spit out, and send any output to /dev/null.
That's easy if I understand your question. In a Terminal window, type "diff" and then the names of the files you want the computer to compare. For example, if you want to compare the contents of two text files you can write something like this: "diff telegram.txt letter.txt". If the files differ, the computer will tell you about the first difference it finds. If the files are the same, it won't say anything about them. To compare files side by side, use sdiff instead of diff.
Naturally, you probably won't use the quotation marks when you type the command. But you will need quotation marks if your file names contain spaces.
Is there anyway to run diff on terminal to find identical data. For example let's say I have two files of e-mails. My boss wants me to find which e-mails overlap in both files. How do i run this diff in terminal?
Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.