Skip to content

Instantly share code, notes, and snippets.

@artagnon
Created October 27, 2009 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artagnon/219817 to your computer and use it in GitHub Desktop.
Save artagnon/219817 to your computer and use it in GitHub Desktop.
fetchlyrics.sh
#-*- Mode:sh -*-
#!/bin/sh
listindex=`head -n 1 "$HOME/.plait/status"`
np=`awk '{if(NR==n) print $0}' n=$listindex $HOME/.plait/plaiter.m3u`
np=${np#"/home/artagnon/music"/}
artist=${np%%/*} # First string before /
track=${np##*/} # Last string after /
track=${track%%.*} # remove extension
track=${track#* } # remove number
perl $HOME/bin/LeoLyrics.pm "$artist" "$track"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment