Cory Petkovsek wrote:

> zless - page a compressed file

You don't need a separate command for that one.

If you Read The Fine Man page, you'll see that less can use an
external program to preprocess the files it reads.  So I do this
in .cshrc.

        setenv LESSOPEN "|/home/kbob/lib/lesspipe.sh %s"

Then lesspipe.sh looks like this.

        #!/bin/sh

        case "$1" in
           *.Z) uncompress -c "$1"
                ;;
           *.z) gzip -d < "$1"
                ;;
          *.gz) gzip -d < "$1"
                ;;
         *.bz2) bzip2 -cd "$1" 2> /dev/null
                ;;
             *) cat "$1" 2> /dev/null
                ;;
        esac

That way, compressed, gzipped, and bzip2'd files are automatically
expanded.

-- 
                                        K<bob>
[EMAIL PROTECTED], http://www.jogger-egg.com/

Reply via email to