要做到这一点
#!/bin/bash
find ./ -name '*.mp3' | while read -r i; do
echo "----------------------------------------"
if [ $(mp3info -x "$i" | grep Audio | awk '{print $2}') < 130 ]
then
read -p "Delete? " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
rm -f "$i" && echo "$i succesfully deleted!"
fi
fi
echo "----------------------------------------"
done
它以这个输出停止:
Error opening MP3: /Like A Prayer/Madonna - Act Of Contrition.mp3: No such file or directory
看起来文件路径有错误,导致缺少前导点。