Using less to view output
John Esak
john at valar.com
Sat May 14 17:43:44 PDT 2005
I know this has little to do with the pmaint type thing in this thread...
but it is another way I use less for our users.
I built a script called "lessit" and it contains only this:
less -P " PRESS\: q to Exit\. Use Arrow-keys or PgDown/PgUp to scroll\. "
$1
Then in my report scripts, I call this simple thing like this:
dreport filename -f outputname -s selstuff -u -p /tmp/this_report_name
lessit /tmp/this_report_name
The execs around here who want to page their reports find it very useful...
and believe me they are not interested in finding out any more tricks "less"
can do. This simple prompt and instructions for paging does all they
will/would ever use.
(The functionality you want for "less" can be put into an environment
variable, but this is another topic.)
John
More information about the Filepro-list
mailing list