#!/bin/sh # Shell script to convert all FLAC files in the current directory to ogg format. # # Author: R.F. Smith # Time-stamp: <2010-08-29 14:03:36 rsmith> # # To the extent possible under law, Roland Smith has waived all copyright and # related or neighboring rights to flac2ogg. This work is published from the # Netherlands. See http://creativecommons.org/publicdomain/zero/1.0/ # Test if all required programs are available. PROGS=oggenc for P in $PROGS; do which $P >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "$(basename $0): The program \"$P\" cannot be found." exit 1 fi done # Re-encode all FLAC files in the current directory for f in `ls *.flac|cut -c 1-7`; do oggenc -o ${f}.ogg ${f}.flac; done