From rlpowell@csclub.uwaterloo.ca Sun May 21 17:01:28 2000
Return-Path: <rlpowell@calum.csclub.uwaterloo.ca>
Received: (qmail 29278 invoked from network); 22 May 2000 00:01:28 -0000
Received: from unknown (10.1.10.142) by m4.onelist.org with QMQP; 22 May 2000 00:01:28 -0000
Received: from unknown (HELO calum.csclub.uwaterloo.ca) (129.97.134.11) by mta3 with SMTP; 22 May 2000 00:01:27 -0000
Received: from calum.csclub.uwaterloo.ca (localhost [127.0.0.1]) by calum.csclub.uwaterloo.ca (8.9.3+Sun/8.9.3) with ESMTP id UAA05836 for <lojban@egroups.com>; Sun, 21 May 2000 20:01:15 -0400 (EDT)
Message-Id: <200005220001.UAA05836@calum.csclub.uwaterloo.ca>
Cc: lojban@egroups.com
Subject: Oops... Re: [lojban] [LONG] UNIX shell script for word lookup 
In-Reply-To: Message from Robin Lee Powell <rlpowell@calum.csclub.uwaterloo.ca> of "Sun, 21 May 2000 19:24:29 EDT." <200005212324.TAA04851@calum.csclub.uwaterloo.ca> 
Date: Sun, 21 May 2000 20:01:14 -0400
X-eGroups-From: Robin Lee Powell <rlpowell@calum.csclub.uwaterloo.ca>
From: Robin Lee Powell <rlpowell@csclub.uwaterloo.ca>


This:

>num=`cat $TEMP | wc -l`
>if [ $num -gt 10 ]
>then
> less $TEMP
>else
> cat $TEMP
>fi
>rm $TEMP

should look like this:

num=`cat $TEMP | wc -l`
eval `stty | grep rows | tr -d ' '`
if [ $num -gt `/usr/bin/expr $rows - 5` ]
then
less $TEMP
else
cat $TEMP
fi
rm $TEMP
rm $TEMP.2

- -----------------

BTW, less is just like more, except almost infinitely better, hence the
expression, "less is more than more". If you don't have it, I very
strongly recommend you fix that.

-Robin

-- 
http://www.csclub.uwaterloo.ca/~rlpowell/ BTW, I'm male, honest.
... stripped of our uniqueness as human beings by Darwin, exposed to our
own inadequacies by Freud, ... Power -- "the ability to bring about our
desires" -- is all that we have left. --- Michael Korda, _Power!_

