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:

Animal Welfare and Capabilitarianism

All ethics is a special case of animal welfare science

via Thing of Things December 18, 2024

Developing the middle ground on polarized topics

Avoiding false dichotomies The post Developing the middle ground on polarized topics appeared first on Otherwise.

via Otherwise November 25, 2024

How to eat vegan on Icon of the Seas

Royal Caribbean has a new giant cruise ship, Icon of the Seas, which has a large selection of food options.

via Home November 21, 2024

more     (via openring)