I have a shell script where I need to do one command if a file is zipped (ends in .gz) and another if it is not. I'm not really sure how to approach this, here's an outline of what I'm looking for:
file=/path/name*
if [ CHECK FOR .gz ]
then echo "this file is zipped"
else echo "this file is not zipped"
fi