while true; do echo -n "Give me the code of that house: " read code ; namef=$(awk NR==1'{print $5}' apartments_file) if grep -q " $code $" apartments_file; then echo "There is already a house named $namef with that code." ; echo -n "Please try again: "; else echo "Apartment name: $name with code $code" >> apartments_file; echo "Apartment name: $name with code $code added successfully." break fi ; done ; break ;[simeon@localhost project]$ cat apartments_fileName of the apartment: "house1" with code :: 90Name of the apartment: "house2!" with code :: 80Name of the apartment: "rush hour" with code :: 100Name of the apartment: "fly away" :: 10Name of the apartment: "flying high" :: 20Name of the apartment: "into the summer sky" with code :: 50and some output of the script:**********************Adding a new apartment...**********************Give me the name of the apartment house: same_house_testingGive me the code of that house: 90There is already a house named "house1" with that code.Please try again: Give me the code of that house: 90There is already a house named "house1" with that code.Please try again: Give me the code of that house: 100There is already a house named "house1" with that code.Please try again: Give me the code of that house: