It is always my favorite.
the following example shows how to change variable in unix shell to lower case and remove file extension
for f in *.shp
#change to lower case
file_name=`echo $f | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
#remove file extension to use as table name
echo "table name: $table_name"