Actually the Func1 is called first which will prompt for the user input to insert the backup copy number from the displayed list (in descending order---latest copy first)
Now, function will also perform a check for which number user has selected.
Now, if it is not 1 then user didnt selected the latest copy, so the Func2 will be called which will prompt the user again for the confirmation "y" or "no"
If user enters "y" code will execute further and if "n" then will again prompt for the number.
zans=y
until [ $zans" = "n" ]
do
function1()
zret=$?
if [ $zret = 1 ]
then
echo "This is not the latest, do you want to select another (y/n)? \c"
read zans
else
zans=n
fi
done