compress files

Could someone give me an idea how to compress all files from a given directory that are not of type .z (compressed). Please help.

compress *
will do it. The compress program will ignore any file that already has a .Z suffix.

but just in case, in ksh you can try:

compress !(*.z)

Or more portably

compress `find . -type f -not -name "*.z" -print`