I am new in bash scripting. I want to create an interactive script which is prompt user to enter data for editing a file line by line.The scenario:- Read a file and iterate over each line, I use for inAsk user whether to edit the line or notIf yes, do the editingIf not, continue to the next lineEnd the interaction after everything finish.My approach:# --> get file contents and convert them to an arrayreadarray thearray < ips.info# --> Iterate the array and do interactive editingfor item in ${!thearray[@]}; do if [[ $item == 0 ]]; then    echo -e First line: ${thearray[$item]}. Change this line? (y/n)    read Useranswer    if [ $Useranswer = y]; then        echo Please type any string:        read Firststring        elif [ $Useranswer = n]; then        # not sure what to write here to resume     fifidoneecho Everything done!Is there any mistake in my code above and how to resume if the user press n on their keyboard?
bash - Change line by line Interactively
bash;shell script;interactive