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:

Starting With Chords

A lot of people play fiddle. Basically nobody starts by learning chords before learning melodies. But that's actually how I learned. I started with chords. One of the nice things about learning to play violin this way is that you can go busking even…

via Anna Wise's Blog Posts November 15, 2024

Stuffies

I have some stuffies and I just have a bunny. Bunny is a rabbit. Woof is a seal. My favorite stuffie is bun bun. I play with my stuffies. Sometimes I jump up with them and I roll them. I can just throw them in the air when I want to play bthululubp wi…

via Nora Wise's Blog Posts November 15, 2024

You Can Buy A Malaria Net

2024 election takes

via Thing of Things November 6, 2024

more     (via openring)