# get_rec
clear
echo -n "Enter the employee surname :"
read STR
if [ "$STR"="q" ]; then
return 1 fi
REC=0
MATCH=no
if [ "$STR" != "" ]; then
while read CODE F_NAME S_NAME DEPART do
REC=`expr $REC + 1` tput cup 3 4
echo -n " searching record.. $REC" if [ "$S_NAME"="$STR" ); then
MATCH=yes
display_rec
break
else
continue
fi
done
else
echo "Enter a surname to search for or q to quit"
fi
if [ "$MATCH"="no" ]; then
no_recs
fi
# основная программа
SAVEDIFS=$IFS
IFS=: get_rec
if [ "$MATCH" = "yes" ]; then
if continue_promptYN "Is this the record you wish to amend" "Y"