[LAU] use your pc as an music player (and safe energy)
frankpirrone at gmail.com
Mon Mar 30 20:25:20 EDT 2009
Grammostola Rosea wrote:
> Dan S wrote:
>> 2009/3/30, Grammostola Rosea <rosea.grammostola at gmail.com>:
>>> david wrote:
>>> > Grammostola Rosea wrote:
>>> >> And is it possible to switch to, for example number 12 of the list?
>>> > Sorry, I have no idea!
>>> Then this is a disadvantage compared to using a gui. But isn't it
>>> possible to solve this?
>> Look it's easy, just press ">" 12 times...
> Sorry I meant 112
If you're not kidding, I actually have an answer for you:
mplayer `grep 112 playlist | cut -d" " -f2`
where your playlist file is numbered with a space between the number and
the file names, and where there are no spaces in the file names. Note
those are back-ticks causing the entire expression they enclose to be
executed before the result is passed to the mplayer executable.
I assume you understand those utilities but if not, grep 112 playlist
looks for a match to that file you wanted to play, and cut -d" " -f2
selects just the file name found in field 2 of the line cut at the space
Now, before you complain that that's a self-defeating amount of typing,
just return to that command in your shell's history and simply change
the number to play my preference, for example - track 111.
If you are kidding, you should be ashamed of yourself... P - )
More information about the Linux-audio-user