Sahih Bukhari Volume 4, Book 52, Hadith Number 149.
Narated By Abu Usaid : On the day (of the battle) of Badr when we stood in rows against (the army of) Quraish and they stood in rows against us, the Prophet said, “When they do come near you, throw arrows at them.”