Example:
I need to find the name of the ear file being deployed
for ent in dist/*
do
if [ "$ent" != "${ent%.ear}" ]
then
echo processing $ent ear file
# take everything from before the .ear input from
# ent variable and store it in app_name
app_name=${ent%.ear}
fi
done