Welkom op LIRONICS DOCs'

Updated: 28-03-2020

findmusic.sh

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

shopt -s -o nounset

#global declarations

clear

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

read bandname

#sanity checks

#main script

if [[ $bandname == "*" ]]; then
echo "Sorry maar alleen op * zoeken werkt niet!"
exit 0
else
toplay=$(find /USB_music/ -maxdepth 1 -iname $bandname  -type d)
fi

echo '- * - * - * - * - * - * - * - * - * - * - * -'

for bandmap in $toplay
do
echo $bandmap
done

echo '- * - * - * - * - * - * - * - * - * - * - * -'

read -p "play or not (y/n)" key;

if [[ $key =~ [yY](es)* ]]; then
nvlc -Z --playlist-autostart --loop --playlist-tree $toplay
else
clear
exit 0
fi

#cleanup
exit 0

Updated: 29-03-2020

findmusic.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

if [[ $bandname == "*" ]]; then
echo "Sorry maar alleen op * zoeken werkt niet!"
exit 0
else
toplay=$(find /home/rvd/music/ -maxdepth 1 -iname $bandname  -type d)
fi

echo '- * - * - * - * - * - * - * - * - * - * - * -'

for bandmap in $toplay
do
echo $bandmap
done

echo '- * - * - * - * - * - * - * - * - * - * - * -'

read -p "play or not (y/n)" key;

if [[ $key =~ [yY](es)* ]]; then
nvlc -Z --playlist-autostart --loop --playlist-tree $toplay
else
clear
exit 0
fi

#cleanup
exit 0