Play audio with a Ruby shell script
1 2 #!/usr/bin/ruby 3 4 #file: ogg-play.rb 5 6 `ogg123 #{ARGV[0]} > /dev/null 2>&1` 7
e.g.
1 2 wget http://upload.wikimedia.org/wikipedia/en/4/4d/Elo_blue_sky.ogg 3 ./ogg-play.rb Elo_blue_sky.ogg
DZone Snippets > jrobertson > ogg123
12861 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
James Robertson http://www.r0bertson.co.uk
1 2 #!/usr/bin/ruby 3 4 #file: ogg-play.rb 5 6 `ogg123 #{ARGV[0]} > /dev/null 2>&1` 7
1 2 wget http://upload.wikimedia.org/wikipedia/en/4/4d/Elo_blue_sky.ogg 3 ./ogg-play.rb Elo_blue_sky.ogg