Reading Manpages On The Train

May 12th, 2011
tech
Stuck on the red line from 6:45 to 7:39. Every few minutes we were told we would be moving 'momentarily'. Forgot my book. Reading manpages. So far I've learned:
  • ssh supports visual host keys
    • When you ssh into somewhere you've sshed into before from this computer, checking that the host key has not changed is easy and automatic. When logging in from a different computer, though, the 'right' thing to do is to check the host fingerprint manually. This is impractical. The idea of a visual host key is that if you trust the computer you're on but not the connection it will display a pictoral representation of the fingerprint. This should be relatively easy to compare with a memorized one from past logins.
    • It also supports putting fingerprints in the dns, though I've never heard of anyone doing that. Perhaps before DNSSEC (which is only just starting to be available) it wasn't so useful because someone that could man in the middle your ssh could just as easily man in the middle your dns?
  • bash will generate sequences with '{N..M}' so '{1..5}' means '1 2 3 4 5'
  • If you have A=1 B=A and want to do ${${B}} to mean ${A} to mean 1, you can't do it. Bash refuses to double expand. Instead you have to do ${!B} which is called indirect expansion. If you also have C=B I don't see a way to do ${!!C} and have a doubly indirect variable reference. I don't see why the didn't go for what I would find intuitive and do ${${B}} or ${${${C}}} along the model of $($(echo 'echo foo')) which does what I would expect it to (expands twice, finally echoing 'foo').
  • I knew bash supported '<(...)' as in "diff <(commandA) <(commandB)" to compare the output of two commands without an intermediate file, but I didn't know it supported '>(...)' to do process substitution for writing, as in "log_results --outfile >(grep foo)".
The especially annoying thing about being stuck is that the first third of our waiting was at harvard station with the doors closed. I would have gotten out and taken the 77 if they had let us. Instead they keep the doors closed. Now we're stuck in the tunnel between davis and porter and they're telling us they're going to reverse back to harvard. Now I'm on a bus. At least it wasn't so delayed that my free transfer expired.

Comment via: facebook

Recent posts on blogs I like:

The Grimke Sisters and Sexism

The necessity of birth control

via Thing of Things April 22, 2024

Clarendon Postmortem

I posted a postmortem of a community I worked to help build, Clarendon, in Cambridge MA, over at Supernuclear.

via Home March 19, 2024

How web bloat impacts users with slow devices

In 2017, we looked at how web bloat affects users with slow connections. Even in the U.S., many users didn't have broadband speeds, making much of the web difficult to use. It's still the case that many users don't have broadband speeds, both …

via Posts on March 16, 2024

more     (via openring)