#!/bin/sh
string="`mp3tag "$1" | sed 's/\([^[:print:]]....\)*//g'`"
artist="`echo "$string" | sed -n 's/.*Artist.*:\(.*[^ ]\) */\1/p'`"
song="`echo "$string" | sed -n 's/.*Songname.*:\(.*[^ ]\) */\1/p'`"
album="`echo "$string" | sed -n 's/.*Album.*:\(.*[^ ]\) *2mYear.*/\1/p'`"
[ "$artist" ] && all=""
[ "$song" ] && all="$all "
[ "$album" ] && all="$all "
echo "$all"