Shoerten the gdb.in file by using while loop