Working with compressed files

Linux usually provides a couple of command piping gzip zgrep, zcat, zdiff, zless, zmore, zegrep,... Here is a simple extension of tail and head for zipped files, that you can call ztail and zhead (example is for tail, replace "tail" with "head" everywhere to get zhead) and add to your own /bin directory:

Caution:
very basic version, works when the options starts with '-' so it works with '-n10' but fails with '-n 10'. Should be easily improved...