LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Old

Random song constrained by keyword on MPC

Posted 08-12-2010 at 12:17 AM by the dsc (linux-related notes)
Updated 08-12-2010 at 12:21 AM by the dsc
Tags mpc, music

Save it as a script, perhaps even as an alias:

Code:
mpc play `shuf -e $(mpc playlist -f "[(%position%) %artist% %title% %file%]" |egrep $1 | grep -Eo "\(.*\)"| sed 's:).*::g' | sed 's:(::g') -n 1`
Then type at some terminal:

mpcr[andom] <artist/keyword>

(or however you chose to name/alias it)

And mpc will play a random song from the pool resulting from the keyword filter.

I guess the whole...
Member
Posted in Uncategorized
Views 795 Comments 1 the dsc is offline

  



All times are GMT -5. The time now is 12:40 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration