Changing the case of a variable or filename in a shell script

Converting a variable to upper or lower case can be accomplished using tr.

For example:

#!/bin/sh
LOWER="erik"
UPPER=`echo $LOWER | tr a-z A-Z`
echo $UPPER

will output:

ERIK