Created
November 24, 2016 08:18
-
-
Save wimvds/65a95ebed34061774396af7f86c2395e to your computer and use it in GitHub Desktop.
Remove an mp3 duplicate (m4a with same name exists in the same folder)
This file contains 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/bash | |
# Usage: | |
# find ~/Music -name '*.m4a' -exec ~/bin/remove-dupe.sh {} \; | |
M4A_FILE=$1 | |
MP3_FILE="${M4A_FILE%.*}.mp3" | |
if [ -f "$MP3_FILE" ]; then | |
rm -rf "$MP3_FILE" | |
echo "Removed $MP3_FILE" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment