Category: scripting

  • Getting the current Date in Your Scripts

    I LIKE stamping things with the date, whether it’s a status report email or filename. (Like say I’ve downloaded todays news in Spanish, it really seems to make sense to tag it as spanish_news_12_8_08.mp3 instead of just spanish_news.mp3 doesn’t it?)

    Okay, so this is something I do in a lot of my shell scripts. Here’s some code to play with.

    (more…)

  • Converting rm to mp3

    Recently I’ve run across a realmedia stream that I really want to convert to mp3 (mainly because my portable player can’t read rm files. I’ll talk about capturing rm streams in another post, but this one is going to talk about converting from rm to mp3.

    For starters, it’s possible to use mencoder for this as follows:

    (more…)

  • SED can make some things SO much easier

    If you have a linux machine and haven’t ever made use of sed (stream editor) you’re missing out on a great automation utility. I’ve saved myself probably 20 hours of manual editing with about an hour of work TWICE today. Here’s how…. over on the North Carolina Genealogy site I was opening forums for each county in the state of North Carolina (100 counties.) Now, I could have gone through and typed out a description, slug (address) and name for each one, but that looked too tedious. So…

    (more…)