Yuzem
August 29th, 2007, 05:27 PM
I am making a script and I need to make a list of files to play in Banshee.
Banshee isn't the problem, the same happens with moc and totem.
The next command works:
totem "file1.mp3" "file2.mp3" "etc.mp3"
Then I get the list of files in the way I want with the following command from a directory with mp3 files:
find "$PWD" -maxdepth 1 -type f -iname '*.mp3' | sort | sed -e 's/^/"/' -e 's/$/"/' | tr '\n' ' '
If I paste the result of the previous command in front of "totem" It works, but if I put all together it doesn't work:
totem $(find "$PWD" -maxdepth 1 -type f -iname '*.mp3' | sort | sed -e 's/^/"/' -e 's/$/"/' | tr '\n' ' ')
Any ideas?
Banshee isn't the problem, the same happens with moc and totem.
The next command works:
totem "file1.mp3" "file2.mp3" "etc.mp3"
Then I get the list of files in the way I want with the following command from a directory with mp3 files:
find "$PWD" -maxdepth 1 -type f -iname '*.mp3' | sort | sed -e 's/^/"/' -e 's/$/"/' | tr '\n' ' '
If I paste the result of the previous command in front of "totem" It works, but if I put all together it doesn't work:
totem $(find "$PWD" -maxdepth 1 -type f -iname '*.mp3' | sort | sed -e 's/^/"/' -e 's/$/"/' | tr '\n' ' ')
Any ideas?