shell scripting problem

her i am trying to edit a database file which is actually a small file holding my friend's name and birthdays

My Database

DEEPAK 27/08
DEEPIKA 18/02
DHYAN 23/03
DIPANKAR 24/10
SNIGDHO 19/05
AYANNAR 17/12
BHAI 22/09
DEBAN 16/08
JAGADISH 02/06
SUBHOJIT 23/02
TOJO 17/09
SUDHIR 12/09

my Code

echo "Enter the friend whose data u want to change ?"
read FRIEND

while read LINE
do
candidate=$(echo $LINE | cut -d ' ' -f1)
birthday=$(echo $LINE | cut -d ' ' -f2)
#mobileno=$(echo $LINE | cut -d ' ' -f3)

                      if [ "$candidate" = "$FRIEND" ] ;then
                            echo "Edit your friend's name"
                            read NAME
  
                            echo "Edit your Friend's B'day"
                            read BIRTHDAY

                            echo " $NAME $BIRTHDAY">>database1

                      else
                        
                         echo " $candidate $birthday">>database1
             
                      fi
          done<"$DIR/database"

later i planned to cp or rename file database1 to database

my problem

as i have redirected the std i/p i cannot read NAME && BIRTHDAY ---can any one give me any sollution

No duplicate or cross-posting, read the rules.

Proceed here:

Thread closed.