if flags

Hi folks.
I'm just starting to teach myself shell scripting and am having some trouble with an if statement. I am working with a directory where only one file will reside at a time and need to evaluate if this file is compressed to determine subsequent steps. I'm using echo for testing purposes. The syntax is:

if [ * -f != "*.Z"]
echo "not zipped"
echo "zipped"

my problem is with the -f flag. I do not want the script to use . or .. , only an ordinary file. When I use -f, I get the correct echo for the .Z file currently in this directory, but I get the error "-f: unknown test operator". If I remove the -f, the echo is incorrect. Whatever can I do?

ok, I've investigated further and it doesn't look like I'm on the right track with this.

-f is a shell operator, as I recall, to test if a file exists. The way you are using the -f operator is not how -f was designed to be used, it seems.