* bad for scripting
Status: Beta
Brought to you by:
loganhanks
the * displayed beside the currently playing song is VERY
bad for scripting. Every time I try something like.
currentsong=`xmms-shell -e list | awk -F'*'`
or better yet.
xmms-sell -e list > currentplaylist
grep "*" currentplaylist
The grep will print out all the files in that folder. It's a very
odd bug on grep's part, however. I figured xmms-sell was
written for bash scripting.
I have a script that uses a hacked version of xmms-shell.
Am I legally allowed to post it on my site so people can use
that script?
Erm
Logged In: YES
user_id=372958
um, maybe you don't know enough bash?
try grep '*' currentplaylist
What's happening is that bash will automatically translate *
to the name of all the files in the current directory. You
can tell bash to ignore the * and pass it to the program by
using single quotes instead of double. Or, you can escape
it: grep \* currentplaylist
And I don't really know what you're trying to do with " |
awk -F'*' " - it doesn't look like valid awk to me......
And why not "xmms-shell -e current-track" ?
Vance