Software written in Bash.

name-by-date is a bash script to rename JPEGs to show their creation date.

$ *.JPG
DSC_0350.JPG taken on "2010."
DSC_0356.JPG taken on "2010."
... uses the exif command line interface to libexif to extract the date from the picture's metadata, so you'll have to install that first.

imapquota is a Python script that checks the space remaining in an IMAP mail account using imaplib.

$ imapquota -s
Used 92693 of 102400 KB
90.5 percent
bat is a bash script to display the available battery charge.

When I'm running X, I usually monitor battery charge with conky, but I wanted a script to allow quick status checks from the command line. You can dig into /sys/class/power_supply/ if you like, but the [acpi client][] (sys-power/acpi) provides a nicer interface:

$ acpi -b
Battery 0: Discharging, 99%, 05:06:14 remaining
cache-file is a bash script to make it easy to sort pictures using pqiv. If you place in your path, and add

-1 " -l saves"
-2 " trash"
-2 " -r"

to ~/.pqivrc, you can hard link the current picture to .cache-saves/ or by pressing 1, move the current picture to .cache-trash/ by pressing 2, or restore the current picture from the caches by pressing 3. The .cache-*/ directory is in the same directory as the image file, and will be created if it doesn't exist.

Not very complicated, but useful for quickly removing almost-duplicates, blurry pictures, etc.

passwd-gen is a /dev/random sanitizer for generating random passwords of various length and complexity.

$ ./ 16
Length of password: 16
Total bytes read:   73
Device:             /dev/random
Set:                [:alnum:]

The script is well commented, so there's not much more to say here...

Alarm is a bash script wrapping at to minimize the number of keystrokes required to set a simple alarm. This one currently rings a bell and prints a message, but the possibilities are endless...

You will almost certainly have to adjust my ALARM_SOUND_CMD to play a file that exists on your system. Try locate *.wav to see what's already there, or grab something new :).

Image click locations

The micro-app just opens an image file and prints out the pixel coordinates of any mouse clicks upon it. I use it to get rough numbers from journal figures. You can use scale to convert the output to units of your choice, if you use your first four clicks to mark out the coordinate system (xmin,anything), (xmax,anything), (anything,ymin), and (anything,ymax).

$ pdfimages article.pdf fig
$ fig-000.ppm > fig-000.pixels
$ 0 10 5 20 fig-000.pixels >

Take a look at plotpick for grabbing points from raw datafiles (which is more accurate and easier than reverse engineering images).


I just discovered inotify and it's command-line incarnation inotifywait (in inotify-tools on Debian). Now I can watch the data come in from home. If only I had the laser- and photodiode-alignment screws motorized... Anyhow, checkout