Tag Archives: bash

Fun with bash and old photo libraries.

It recently dawned on me I had huge swathes of my photo collection entirely gone. Something like 3 years that were nowhere to be found on flickr or my main PC or Mac. I’m not sure how this gap appeared … Continue reading

Posted in Computer, Photography, Programming | Tagged , , , , , | Comments Off on Fun with bash and old photo libraries.

A small script hacked up to monitor directories.

This is something I knocked up a while ago just to keep an eye on a directory structure for permissions changes, excluding upload directories and other things: #!/bin/bash ignore[0]=”./public_html/blog/wp-content/uploads” ignore[1]=”./bb-attachments” cd unset unsecure i i=0 while IFS= read -r -d … Continue reading

Posted in Programming | Tagged , | Comments Off on A small script hacked up to monitor directories.

DynDNS.org + Bash + Router == A tiny bit safer.

Pondering how to lock down a few bits to just an IP or two I hacked together this awful bit of bash: #!/bin/bash function valid_ip() { local ip=$1 local stat=1 if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then OIFS=$IFS IFS=’.’ ip=($ip) … Continue reading

Posted in Programming | Tagged , , | 1 Comment