need some help on using diff command
hi all,
i have file1 and file2. Quote:
Quote:
File 3 contents should be Quote:
|
Hi,
Your examples have 3 entries that are in both files, not 2...... To use diff (or in this case comm) you need to have sorted in-files. If they are sorted then the following will show entries that are in both files: comm -12 file1 file2 Example run: Code:
$ cat file1 |
thanks drunna, it worked.
I didnt sort the files first. Now it works as i want. Thanks again, One more question. In file1, eononono was remaining or we can say its not in file2. I want to take this in a separate file. I need the same from file2. Please help me |
Hi,
Files that are unique to file1: comm -23 file1 file2 Code:
$ comm -23 file1 file2 Code:
$ comm -13 file1 file2 |
thanks man, you are great.
It worked well. |
You're welcome :)
|
All times are GMT -5. The time now is 10:03 PM. |