#!/bin/bash answer=yes totalnumber=0 countTot=0 max=-99999999 min=999999999 avgtot=0 while [ "$answer" = "yes" ] do clear read -p "Please enter employee first name : " fn read -p "Please enter employee last name : " lna read -p "Please enter employee user name : " una while [ -e "$una" ] do echo "value must be between 1 and 5" read -p "Please enter employee user name : " una done Mkdir $una read -p "Please enter employee password : " pw echo “Your username is $una and your password is $pw ” > $una/$lna.txt read -p "Please enter number of files : " num while [ $num -lt 1 ] || [ $num -gt 5 ] do echo "value must be between 1 and 5" read -p "Please enter number of files : " num done counter=1 while [ $counter -le $num ] do counter1=1 while [ $counter1 -le $counter ] do echo “this line $counter1 from file $counter ” >> $una/file$counter.txt let counter1=counter1+1 done let counter=counter+1 done totalnumber=$(echo "scale=2; $totalnumber+$num" | bc -l) let countTot=countTot+1 if [ $num -lt $min ] then min=$num fi if [ $num -gt $max ] then max=$num fi read -p "do you want to play again yes/no " answer done echo "The Total Average number of employees is $countTot " echo "The Total Average number of files is $totalnumber " avgtot=$(echo "scale=2; $totalnumber/$countTot" | bc -l) echo "The Total Average number of files is $avgtot " echo "The max file is $max " echo "The Min file is $min"