Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can use comm from coreutils for that too: `comm -1 file1 file2`


The comm manpage[1] says that the files have to be sorted. In combine, they do not.

1. http://manpages.ubuntu.com/manpages/zesty/en/man1/comm.1.htm...


Yep, but you'll have to read the man everytime to figure out if you need -1, -2 or -3, or a combination of those. combine gives you a better interface with boolean operators you know.


The 1st column is the lines unique to the 1st file, the 2nd column is the lines unique to the 2nd file, and the 3rd one is the lines that are not unique. -1, -2, -3 allow to disable those columns. Pretty easy to remember.

Ah, HN downvoting neutral comments again and I don't like it, but I have a policy of not upvoting anything out of pity.


Ahaha, then I guess I don't use it that often. I'll try to remember this mnemonic.

PS: do not worry about karma ^^




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: