#!/bin/sh mpd_conf=/etc/mpd.conf mpd_host=`cat «$mpd_conf»|awk '/bind_to_address/'|cut -d\" -f2|grep socket`
export MPD_HOST=«$mpd_host»
function add_files { for f in «$@»; do if [ -d «$f» ]; then cd «$f» add_files * fi mpc add «file://$PWD/$f» &>/dev/null done }
add_files «$@»