Random picking without repetition

So the problem was to draw people at random from a list. The list is contained in a leads.txt text file, one per line. This nifty one-liner will output a randomly-picked person from that file every time it’s invoked. it’ll then remove the name from the file so it doesn’t get repeated again. export i=`sort […]

Building Debian/Ubuntu packages with sbuild

Many of the on-line instructions and tutorials are quite complicated. Why? It was easy for me: sudo apt-get install sbuild To build a virtual machine: mk-sbuild –distro=ubuntu –arch=i386 precise this will create a schroot in /var/lib/schroots/precise-i386. Note how it appends the architecture to the schroot name. Also note that the first time you run mk-sbuild, […]

Using diff on the output of two commands – named pipe and bash magic

Ever wanted to diff the output of two commands? Usually it’s done by first piping each command to a temporary file and then diffing them. The following syntax creates a named pipe for the command and uses the pipe’s name instead of a filename. Bash takes care of everything automagically so all you have to […]