From: Colin McCabe Date: Mon, 14 Dec 2009 01:11:19 +0000 (-0800) Subject: Add audiorip script for ripping audio cds X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af49f78fb95755adbc9cd934577a9a5b27adddce;p=cmccabe-bin Add audiorip script for ripping audio cds --- diff --git a/audiorip.sh b/audiorip.sh new file mode 100755 index 0000000..d1aed4f --- /dev/null +++ b/audiorip.sh @@ -0,0 +1,116 @@ +#!/bin/bash + +# +# audiorip +# +# Shell script to rip an audio CD-ROM. +# +# To use this, first create a directory for the mp3s, and cd to that +# directory. Then run this script. This script also saves lossless copies of +# the mp3s in a directory ending with [LL]. +# +# One of these days I'm going to rewrite this in Ruby or some other language, +# and include more advanced features, like the ability to rip multiple +# CD-ROMs at once. For now, this script works, and is a good example of +# using getopts with bash. +# +# Colin McCabe +# + +wav_to_mp3() +{ + for i in *.wav; do + lame -q $2 -b $1 "$i" + done +} + +usage() +{ + cat <