1 Sam 17:12-23 (ESV) 12 Now David was the son of an Ephrathite of Bethlehem in Judah, named Jesse, who had eight sons. In the days of Saul the man was already old and advanced in years.[a] 13 The three oldest sons of Jesse had followed Saul to the battle. And the names of his three sons who went to the battle were Eliab the firstborn, and next to him Abinadab, and the third Shammah. 14 David was the youngest. The three eldest followed Saul, 15 but David went back and forth from Saul to feed his father's sheep at Bethlehem. 16 For forty days the Philistine came forward and took his stand, morning and evening.
17 And Jesse said to David his son, “Take for your brothers an ephah[b] of this parched grain, and these ten loaves, and carry them quickly to the camp to your brothers. 18 Also take these ten cheeses to the commander of their thousand. See if your brothers are well, and bring some token from them.”
19 Now Saul and they and all the men of Israel were in the Valley of Elah, fighting with the Philistines. 20 And David rose early in the morning and left the sheep with a keeper and took the provisions and went, as Jesse had commanded him. And he came to the encampment as the host was going out to the battle line, shouting the war cry. 21 And Israel and the Philistines drew up for battle, army against army. 22 And David left the things in charge of the keeper of the baggage and ran to the ranks and went and greeted his brothers. 23 As he talked with them, behold, the champion, the Philistine of Gath, Goliath by name, came up out of the ranks of the Philistines and spoke the same words as before. And David heard him.