Welkom op LIRONICS DOCs'

Updated: 29-03-2020

findmusic_array.sh

#!/bin/bash
#
#CVS: $Header$

shopt -s -o nounset

#global declarations

echo "Type band name (do not start string with *?? or use * only!)"
read bandname

#sanity checks

#main script

to_play=$(find /home/rvd/music/ -maxdepth 1 -iname $bandname  -type d)

echo $to_play
echo "- -"

IFS=' '
declare -a array=$to_play

for element in ${array[@]};
do
echo $element
done

echo "- -"

for i in ${!array[@]};
do
echo $i + ${array[$i]}
done

#nvlc -Z --playlist-autostart --loop --playlist-tree $toplay

#cleanup
exit 0