Today I was sitting in the plane from Dresden to San Francisco, and worked on my DKMS demo for the Linux Foundation summit. DKMS is a command line tool for managing device driver packages.
I wondered how to present this. The commands and features I wanted to show are quite complex, and typing all of them during the presentation is too cumbersome. Besides, I’m just a lousy typer when someone else is watching. On the other hand, pasting them into classical slides is too static; I find it much easier to understand something that reveals itself step by step.
So what I needed is to prepare the chain of commands in advance, and then send them through an interactive “step by step” interpreter. A quick apt-cache search did not reveal any readymade solution, thus I hacked together a small script “shellpresent” which does exactly that:
- a line with a command gets echoed, then it waits for a keypress, then runs the command and waits for another keypress (so that you can explain the output)
- a comment line starting with # is printed in green, and doesn’t wait for a keypress
- a blank line clears the screen
- commands are prepended by a red “$” sign to indicate a command prompt
It now does exactly what I want. Perhaps it is useful for someone else out there as well.
#1 by Marius Gedminas on 2009/04/05 - 16:50
Zitieren
Usually, when I get to the point where explaining the long-and-complicated command line to someone becomes difficult, I try to redesign the tool to make the command lines simpler.
I can’t say whether it applies to dkms or not, having never used it.
#2 by martinpitt on 2009/04/05 - 17:23
Zitieren
Long command lines are a small part of the problem, that could indeed be made simpler. But mostly it’s not because there are 5 long and complicated commands, but 50 easy ones. I want to demonstrate half a dozen use cases, build generated packages, show logs, etc.
#3 by Raphaël Pinson on 2009/04/06 - 08:37
Zitieren
Good one. I hacked that directly in a specific script last time, which would echo the command followed by a read. Of course, it’s nicer if it’s more generic
#4 by Indijan on 2009/04/25 - 00:25
Zitieren
I use something similar (not for presenting, but for correcting shell script assessments). For showing commands I use a combination of the “highlight” program and grep.