#!/bin/sh for i in *.mp3; do SONG=`basename "$i" .wav` if [ -e "$i" ]; then mpg123 -w "$SONG.wav" "$i" fi done