#!/bin/bash
#### USAGE ####
# ./idtag.sh mass < art <artist> | alb <album> | dat <date> >
BinPath="/usr/bin"
TagArgs=""
art="-a" # i want these three to replace the \$$2, \$$4 or \$$6.
alb="-A" # PROBLEM: \$$2 will not display as -a, but will display as $art, which is no good for the id3v2 program.
dat="-y"
if [ "$1" = "mass" ]; then
if [ "$2" != "" ]; then
Cmd1="\$$2 $3" #
TagArgs="$Cmd1"
fi
if [ "$4" != "" ]; then
Cmd2="\$$4 $5"
TagArgs="$TagArgs $Cmd2"
fi
if [ "$6" != "" ]; then
Cmd3="\$$6 $7"
TagArgs="$TagArgs $Cmd3"
fi
for in in "$dir"/*.mp3; do $BinPath/id3v2 $TagArgs; done
fi