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

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

[1] https://linux.die.net/man/1/socat



I'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.


You might like fzf for that.


PSA: 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


I 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.)



No, socat is for sockets, not for “serial”.


Oooohhh!


Beware 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
  …


And, fun fact, "socat" is how "kubectl port-forward" works so it'll likely be present on any machine behaving as a kubernetes Node




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

Search: