Files
Server-scripts/quiethost/pl_find.sh
T

14 lines
399 B
Bash
Raw Normal View History

2026-04-14 23:55:46 +02:00
#!/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