Created
October 5, 2013 23:07
-
-
Save anonymous/6847166 to your computer and use it in GitHub Desktop.
renamemp3
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
| ############################################################################### | |
| # | |
| # renamemp3 - Version 1.0 | |
| # Copyrighted (c)2013 Dwight Spencer (@denzuko) <[email protected]> | |
| # All Rights Reserved. Licenced under OSI MIT licence. | |
| # | |
| # renames files in a directory given by parameters to append '.mp3' | |
| # | |
| ############################################################################### | |
| usage() { | |
| echo "${0} [directory]" | |
| return 0 | |
| } | |
| main() { | |
| find $1 -type f -print0 | xargs -0 -I {} mv {} {}.mp3 | |
| } | |
| [[ -z $@ ]] && usage || main | |
| ############################################################################### | |
| # vim: syntax=sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wrote this one for chrismmoody.com