shell script implementation of man

Cathey, Jim jcathey at ciena.com
Wed Nov 19 17:13:28 UTC 2008


I believe it is customary to use an environment
variable PAGER to allow overriding of less (or
more, or whatever the system default is).  In ksh-speak:

case $pagefile in
*.bz2)
        bzcat $pagefile | ${PAGER:-less} ;;
*.gz)
        zcat $pagefile | ${PAGER:-less} ;;
*)
        ${PAGER:-less} $pagefile ;;
esac

-- Jim







More information about the busybox mailing list