4 ms·
I wonder how many coreutils commands that really are "core". Certainly cat, head, tail and a few more. But some of the others feel really esoteric, and I don't
by mongol 5y ago
I wonder how many coreutils commands that really are "core". Certainly cat, head, tail and a few more. But some of the others feel really esoteric, and I don't know if knowing them really helps you to solve problems faster. I think knowledge of perl, awk or sqlite will help much more.
- jstanley 5y agoWhich ones do you think are esoteric?
- Xophmeister 5y agoThey definitely exist on a spectrum. Some are used super-regularly, others I've never heard of. `ptx` and `tsort` come to mind as esoteric; I'm not even sure what `ptx` does! Some are a bit redundant, as well (e.g., `dir`, `link`, etc.)
- riffraff 5y agofor 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`!