Sam's Blog entries for 15 June 2012

Note to future me: Are you trying to remember how to shell-quote/escape the contents of a variable to avoid going utterly insane from the nested double-quotes and backslashing?

printf -v escaped_var "%q" "$var" is the command that you can never remember, and never find the documentation for until you've wasted a morning of your life.

Don't forget it next time. Or at least, remember that you wrote this note, kthxbai.

Bash-itunes plugin tutorial

Date: Friday, 15 June 2012, 11:03.

Categories: bash-itunes, itunes, cli, bash, shell-scripting, apple-script, tutorial.

In v1.2.0 of bash-itunes, my project to control iTunes from the command-line, I've added plugin support for sub-commands.

This allows you, or anyone else, to add new commands to the basic script without needing to alter the script itself.

Read below the cut for details and a walkthrough of creating a new plugin.

Browse Sam's Blog Subscribe to Sam's Blog

By day of June: 07, 08, 15.

By month of 2012: April, May, June, July, December.

By year: 2010, 2011, 2012, 2013.

Or by: category or series.

© 2009-2013 Sam Graham, unless otherwise noted. All rights reserved.