4 ms·
I love these one-liners. It's also about knowing your tools better. I hadn't known about `look` [0], which is great. The writer looks to be a bioinformatician
by abetusk 4y ago
I love these one-liners. It's also about knowing your tools better.
I hadn't known about `look` [0], which is great.
The writer looks to be a bioinformatician, so it might be a bit out of scope, but I also found `socat` [1] quite a good serial communication helper tool.
[0] https://man7.org/linux/man-pages/man1/look.1.html https://man7.org/linux/man-pages/man1/look.1.html
[1] https://linux.die.net/man/1/socat https://linux.die.net/man/1/socat
- mxuribe 4y agoI don't recall where I heard it, but my understanding is that socat is the sort of successor to good ol' netcat. (Of course, don't ask me to compare each, nor know what socat brings that netcat lacks, etc.)
- mdaniel 4y agoAnd, fun fact, "socat" is how "kubectl port-forward" works so it'll likely be present on any machine behaving as a kubernetes Node
- adastra22 4y agoI've used `look` for years when I'm not sure how to spell some obscure word and I'm in a context where there isn't a built-in spellchecker (e.g. editing source code). I was today years old when I learned that looking up words from the system dictionary is just the convenient default and you can use it to search lines from any file.
- ttyprintk 4y agoYou might like fzf for that.
- jwilk 4y agoPSA: don't use linux.die.net. It's horribly outdated. This particular man page is from 2015 or (likely) earlier. Official docs: http://www.dest-unreach.org/socat/doc/socat.html http://www.dest-unreach.org/socat/doc/socat.html
- jwilk 4y agoBeware that look(1) does binary search, so it won't be reliable if the input file is not sorted in the exact way look(1) expects it. On my system: $ look asce Ascella Ascella's $ grep -i ^asce /usr/share/dict/words Ascella Ascella's ascend ascendancy ascendancy's …