Israeli soldiers and officers have said they were ordered to shoot at unarmed civilians waiting for food in Gaza.