Hello I have some nested loop to display files and form menu item.
The part of the code is below.
I found that after runnining the script for a while the display becomes very slow.
Does ksh shell provided any easy way to release variables, reinit, etc.
while [[ $MENU_OPTION == "N" ]];do
script=0
town[0]="Start"
\#Loop to display Menu Item
\#
READ_OPTION="N"
while [[ $READ_OPTION == "N" ]];do
i=0
\#Menu Item
clear
for file in \`ls x*.txt\`; do
\{
\(\(i=i\+1\)\)
town[$i]=$file
menuitem=$\(print $\{town[$i]\} | sed -e "s/\\_/ /g"\)
mitem=$\(print $menuitem | sed -e "s/\\.txt/ /g"\)
if \(\($i<10\)\) then
print " \\c"
fi
echo "$i ":" $mitem "
\}
done
...
done
...
...
..
...