Files
Server-scripts/quiethost/pl_find.sh
T
2026-09-14 12:43:38 +02:00

15 lines
399 B
Bash
Executable File

#!/bin/bash
ls "$1"
if [ $? -ne 0 ] || [ "$1" == "" ]; then
echo "List $1 not available"
fi
list=$1
IFS=$'\n'; set -f
songs=($(cat ${list} | cut -f1 -d';'))
artists=($(cat ${list} | cut -f2 -d';'))
unset IFS; set +f
for((i=0;i < ${#songs[@]};i++)) do
printf "%s - %s\n" "${artists[i]}" "${songs[i]}"
find /data/DatenLucas/Music/ -type f -iname *"${songs[i]}"* | grep "${artists[i]}"
done