I. Love. Emacs.

Earlier in the week, I needed to extract some performance data from our apache logs. Nothing too crazy, so I whipped it together in Perl.

The log files I needed were placed nightly on a server, so I whipped up a shell script to snag them & bring them locally as well. I need to delete files non-error logs (containing my metrics), and decompress things, but overall it worked well.

Only it required me typing in four commands.

Each day.

Being a geek, I was offended by this & decided to take the five minutes to automate all that as well. After all, I’m smart.

Only that part were I delete files that aren’t error logs?

Well, that included my script.

I had to run ls a few times before I could believe it.

D’oh. So much for smart.

Licking my wounds, a few hours later, I decide to suck it up & just set about writing it again. I fire up emacs and then remember — emacs automatically makes backups! I head over to my autosave-dir directory and — YES! — there is my file!

I think I need to fire-up doctor mode & say thank you.

Leave a Reply