#!/bin/sh # Shell script to build a mp3 playlist recursively from a directory, # labeling directories inside brackets [ Artist - Album ] # By Ryan Veety for carmp3 player if [ ! "$1" ] ; then echo "Usage: buildlist " exit fi IFS=" " for file in `find $1/* | sort` ; do if [ -d "$file" ]; then echo " [ " `echo "$file" | sed "s|^$1/*||" | sed 's|/| - |g'` " ] " else echo $file fi done