November 30, 2007

Do you ever spend 20 minutes figuring out the perfect way to do some arcane task on the command line, only to forget it and need it again in a month? I do. A lot.

I started keeping a directory with little plain text documents that had the command line I wanted inside them. I recently uploaded them to my static site and wrote a script to use them easier.

It’s real simple, just download the howto bash script in the following directory and place it in your path. Now make a directory for your HowTo’s somewhere and put the whole path into a file in your home directory called “.howto”.

You should be able to call $ howto --sync and it will pull down a tar of the most current files, then expand it into your HowTo directory.

If you download the howto.tar.gz by itself, be warned that it is a tar bomb and will rudely scatter its files all over your directory.

Lastly, onceyou have some HowTo’s installed, just use $ howto -l to list out the possible choices, then $ howto print-unix-timestamp, replacing “print-unix-timestamp” with the name or number of the HowTo you want.

Below is the howto shell script, because I like including code in my posts whenever I can.

Categories: Geek
Tags: , ,

Leave A Comment

Your email will not be published.