Skip to content

Instantly share code, notes, and snippets.

@davidbody
Forked from timander/combine_mp3_files.rb
Created February 17, 2010 13:21
Show Gist options
  • Save davidbody/306594 to your computer and use it in GitHub Desktop.
Save davidbody/306594 to your computer and use it in GitHub Desktop.
#!/bin/ruby
def combine_mp3_files(final_mp3)
`rm #{final_mp3}`
Dir.glob("*.mp3").sort.each do |file|
puts "#{file}"
`cat "#{file}" >> #{final_mp3}`
end
end
combine_mp3_files('my_big_file.mp3')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment