Being a new but quick learner of linux, how does one go about creating a bash script?
Just take the script I posted above and put it into a file named filename.sh (use nano or vim or whatever you normally use to edit files on your server), then save it and make it executable:
chmod a+x filename.sh
Then you can just run it as /path/to/filename.sh. Obviously pick a better filename.
How do we detemine what the names of each playlist are?
Login to the account and check the playlist list. The name is the title of the playlist.
Also is there a way to run the command line and tell it to exclude files?
Few ways you could do it, but off the top of my head, replace line 6 of the script above with:
for f in `find * -maxdepth 0 -type d | grep -v stationid`; do
Then put all of your station IDs in a subdirectory called "stationid".
I played with this a little and determine that when entering the playlist name it is case sensitive and needs to be named exactly the same as your playlist name
Not unless something is up with your MySQL server. I'm looking at the code right now and it just does a query to the effect of:
SELECT ... WHERE title LIKE '%playlistname%' ...
So that should be case-insensitive and it should match partial names as intended, eg. using "heavy" should match "Heavy Rotation".