Skip to content

Instantly share code, notes, and snippets.

Created October 5, 2013 23:07
Show Gist options
  • Select an option

  • Save anonymous/6847166 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/6847166 to your computer and use it in GitHub Desktop.
renamemp3
###############################################################################
#
# 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
@denzuko
Copy link
Copy Markdown

denzuko commented Oct 5, 2013

I wrote this one for chrismmoody.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment