Skip to content

Instantly share code, notes, and snippets.

@devpg
Created July 22, 2012 10:46
Show Gist options
  • Save devpg/3159247 to your computer and use it in GitHub Desktop.
Save devpg/3159247 to your computer and use it in GitHub Desktop.
Returns the genre of a mp3 file (based on its id3v2 tag)
#!/bin/bash
genre=$(id3v2 -l "$1" | sed -n '/^TCON/s/^.*: //p' | sed 's/ (.*//')
echo $genre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment