Created
January 3, 2020 11:40
-
-
Save ignaciomosca/2b2ed17ef3083e1dd59f3d1b1c1ba453 to your computer and use it in GitHub Desktop.
How many minutes of music are in a folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$*" ]; then echo "Missing folder"; exit 1; fi | |
for d in $1; do | |
if [ -d "$d" ]; then | |
cd "$d" | |
exiftool -n -q -p '${Duration;our $sum;$_=ConvertDuration($sum+=$_)}' ./*.mp3| tail -n1 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment