#!/bin/ksh
# Script name: todebug2
# Example 10.135

trap 'print "num=$num on line $LINENO"' DEBUG
num=1
while (( num < 5 ))
do
    (( num=num+1 ))
done
print The grand total is $num
