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:

Where I Donated In 2024

All Grants Fund, Rethink, EA Funds Animal Welfare Fund

via Thing of Things January 17, 2025

2024-25 New Year review

This is an annual post reviewing the last year and setting intentions for next year. I look over different life areas (work, health, parenting, effectiveness, travel, etc) and analyze my life tracking data. Overall this was a pretty good year. Highlights …

via Victoria Krakovna January 15, 2025

The ugly sides of two approaches to charity

What's neglected by "magnificent" philanthropy, and by Singerian global poverty focus The post The ugly sides of two approaches to charity appeared first on Otherwise.

via Otherwise January 13, 2025

more     (via openring)