## read with prompt. The prompt you used is "MNAME " assignment is by default to the reserved variable REPLY.
## if you wish to assign to a variable it should follow the prompt.
## you can assign to a number of variables with:
## read -p "MYPROMPT " var1 var2 varjunk
## that will assign the first variable into var1 the second into var2 and all further into varjunk
## this just demonstrates what what was assigned to the default variable REPLY.
## I don't see you piping or otherwise transferring data gleaned from the read command to the awk script.
## Tinker, I admit to not understanding the $(( )) construct within the awk code.
## The ( ) to force an expression is good for me. perhaps Tinker can enlighten us please.
## I never write code, I develop it. That is to say I regularly put in echo and print statements to prove anything and everything as I progress to ensure that all assumptions I make are tested during the coding. I throw away probably 5/6 or more of what I write, because I don't write it every day to be as familiar as I aught to be.
## Oh, and a problem shared is someone elses! If your project is going overtime, don't hide it but tell your manager. He might not be too happy at the prospect, but to get someone else to do the job won't be practical and once he knows about it, then he isn't going to be set upon by a client demanding answers and not knowing the score. As soon as he says, "ok hurry it up", then the pressure is off of you and on the manager.
## Have a happy project.