Skip to content

Instantly share code, notes, and snippets.

@CarlQLange
Created December 29, 2011 05:43
Show Gist options
  • Select an option

  • Save CarlQLange/1532172 to your computer and use it in GitHub Desktop.

Select an option

Save CarlQLange/1532172 to your computer and use it in GitHub Desktop.

Revisions

  1. CarlQLange revised this gist Dec 29, 2011. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,7 @@
    Line 2 below breaks, because of the single-quote in the song title. Bash is sucky and doesn't allow backslash escaping for that, and doing the '"'"' solution (as documented here http://stackoverflow.com/questions/1250079/bash-escaping-single-quotes-inside-of-single-quoted-strings) doesn't work because it's already in an applescript string. Best would be a general solution.
    Line 2 below breaks, because of the single-quote in the song title. Bash is sucky and doesn't allow
    backslash escaping for that, and doing the '"'"' solution (as documented here
    http://stackoverflow.com/questions/1250079/bash-escaping-single-quotes-inside-of-single-quoted-strings)
    doesn't work because it's already in an applescript string. Best would be a general solution.

    osascript -e 'tell application "iTunes"
    play track "Rory's First Kiss (Ryeland Allison remix)"
  2. CarlQLange created this gist Dec 29, 2011.
    5 changes: 5 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    Line 2 below breaks, because of the single-quote in the song title. Bash is sucky and doesn't allow backslash escaping for that, and doing the '"'"' solution (as documented here http://stackoverflow.com/questions/1250079/bash-escaping-single-quotes-inside-of-single-quoted-strings) doesn't work because it's already in an applescript string. Best would be a general solution.

    osascript -e 'tell application "iTunes"
    play track "Rory's First Kiss (Ryeland Allison remix)"
    end tell"'