very much thanks to u.
hey can u also tell me how to blink a text in a file and contnue with the rest of the program.
actually it only blinks and i cannot do the rest as i should wait for the blinking to stop
Ordinarily, yes, you would need to quote subscripted variables within braces "{ }" to protect the square brackets "[ ]" from the shell when accessing them. (You don't need to do this when setting them.) This should not be necessary inside the evaluation of double-parenthesis "(( ))". So the problem is not at line 31, but at 33, 34, and 35, using the syntax as suggested above. It just shouldn't be needed in the "if" clause.
You can blink text with "tput" if your terminal type supports blinking text. See the man page of tput for the correct options to use (i.e., I can't remember!)