3 ms·
for me: comm[0]. It's super useful when you need it, but I've never seen it used by anyone else but me. [0] https://www.gnu.org/software/coreutils/manual/html_
by riffraff 5y ago
for me: comm[0]. It's super useful when you need it, but I've never seen it used by anyone else but me.
[0] https://www.gnu.org/software/coreutils/manual/html_node/comm-invocation.html#comm-invocation https://www.gnu.org/software/coreutils/manual/html_node/comm...
- Xophmeister 5y ago`comm` and `join` are like super powers to those who don't know about them :)
- cauthon 5y agoIf I'm reading the man page correctly, the following two commands are almost equivalent? $ comm -12 file1 file2 $ fgrep -w -f file1 file2 but `comm` generalizes to accommodate lines with whitespace, instead of single words? although it requires the files to be sorted. That's actually a super useful tool to know about
- asicsp 5y agoYou can use `-x` option to compare whole lines. So `grep -Fxf` is similar to `comm -12` (this will differ if there are duplicate lines within a file)
- aaaaaaaaaaab 5y agoAlso check out `paste`!