This was used for gzip'ing many .dmp files that were in a folder to save space. it compresses the files about 1/8th of the originaly size.
for i in *.dmp; do gzip $i; done
I ran this on one of our servers to save a large amount of disk space. I then moved all of the gzip files off to archive.
In my example I used the gzip command but you can put anything in its place.
Hope this helps someone