Skip to content

Instantly share code, notes, and snippets.

@dungam
Created July 20, 2016 23:16
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 dungam/0ff531e3c1d16d2ef6bdf5f7c7658e7d to your computer and use it in GitHub Desktop.
Save dungam/0ff531e3c1d16d2ef6bdf5f7c7658e7d to your computer and use it in GitHub Desktop.
Delete audio files by bitrate
#!/bin/bash
## Paste on the command line to delete 256K bitrate mp3 files.
## /bin/bash at the top is here only to assist syntax highlighting
for i in *.mp3; do exiftool -audiobitrate "$i" | perl -ne 's,.*: (\d+).*,\1,g ; $rate=$1; if ($rate==256000) { print "rate: $rate\n"; }'; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment