I want the following script to "pg" or "more" only if the result is greater than 1 page ;
-------------------
for file in `ls s*`
do
echo $file
done
-----------------
Adding the pg or more at end of the echo line does not work.
if [ $a > "36" ] # 36 = screen line length
then
for file in `ls s*`
do
pg $file
done
else
for file in `ls s*`
do
cat $file
done
fi --
| Mike Nixon
| Unix Admin
|
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.