Last active
August 29, 2015 14:02
-
-
Save ruuda/4f5dff7a850e2984d409 to your computer and use it in GitHub Desktop.
Scrub flac music collection
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 | |
# Timestamp starting the scrub. | |
echo -n 'initiating scrub at ' >> scrub.log | |
date >> scrub.log | |
# Enumerate all flac files, run `flac -tsw` (test silent, warning as error) on it, | |
# and output the filename to scrub.log if it fails. | |
find /path/to/music -type f -name '*.flac' | while read file; do | |
flac -tsw "$file" || echo "$file" >> scrub.log | |
done | |
# And timestamp when it was done. | |
echo -n 'scrub done at ' >> scrub.log | |
date >> scrub.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment