Skip to content

Instantly share code, notes, and snippets.

@daniel-j
Created October 19, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniel-j/705577af341feb9f9863 to your computer and use it in GitHub Desktop.
Save daniel-j/705577af341feb9f9863 to your computer and use it in GitHub Desktop.
#!/bin/bash
music="/audio"
maxbitrate=160
find "$music" -type f -name '*.mp3' | while IFS='' read -r line || [[ -n "$line" ]]; do
bitrate=$(mp3info -r m -p %r "$line")
if [ "$bitrate" -lt "$maxbitrate" ]; then
echo "$bitrate" "$line"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment