#!/bin/bash # Write a while loop that prompts for and then adds the two provied # values. # Then prompt the user if he/she wants to continue y or n. # * Does not error checking. # ans=y while [ "$ans" = y ] do echo -n "First number ? "; read num1 echo -n "Second number ? "; read num2 echo "total = `expr $num1 + $num2`" echo -n "Continue y/n? "; read ans done