http://www.linuxdoc.org/LDP/abs/html/index.html
this is a Bash Scripting guide
learn it urself, it will only benefit u
I have all of my songs in one dir (/media/audio) They are all named in the way 'artist - songname.mp3/ogg' Is someone able to provide the code for me to be able to
a) take $artist, make a dir for the artist with the $artist variable if there are more than 2 songs by that artist
b) move the songs with 2 or more songs by that artist to the dir created from the artists name
c) move the songs that didn't have another song by the same artist to a serperate dir (eg, misc)
Its a bit to complicated for me to even attempt. Could someone possibly write a script for me?
http://www.linuxdoc.org/LDP/abs/html/index.html
this is a Bash Scripting guide
learn it urself, it will only benefit u
Okay, will give it a try. Will probably just be quicker to create all the dir's and move the songs myself. ;D
probablyOkay, will give it a try. Will probably just be quicker to create all the dir's and move the songs myself. *;D
but learning about bash scripting is really something i recommend to everyone. u don't have to become an expert at it, but just some basic knowledge about it could help u out in a lot of situations
Yeah, I know what you mean. Saves trying to learn it when I REALLY need it.![]()
I agree with Ralinx, you should learn how to do it yourself. The part about moving the one-song artists into a misc directory could be kind of tricky, but the rest is easy. I mean, about 5 lines max. Just make a for loop to cycle through the files, use sed to weed out the artists name, then use mkdir to make the dir, then move it in there. I'd write it for you myself but I want you to learna) take $artist, make a dir for the artist with the $artist variable if there are more than 2 songs by that artist
b) move the songs with 2 or more songs by that artist to the dir created from the artists name
c) move the songs that didn't have another song by the same artist to a serperate dir (eg, misc)
Its a bit to complicated for me to even attempt. Could someone possibly write a script for me?
Hope your set pattern is 100% and that there are no "-" in any of the artist names or it'll make it a bit more challenging
What will help you learn is to get some code that works. read it. And watch HOW it works. There are a few sites out there that you can copy some bash scripts from. This is one I contribute to:
http://www.codeexamples.org/
Good luck.
Bookmarks