Riyad as-Salihin, Book 1, Hadith 257 (In-Book)

Abu Hurairah (May Allah be pleased with him) reported: Messenger of Allah said, "Many a person with shaggy and dusty hair, dusty and driven away from doors (because of their poverty and shabby clothes) were to swear by Allah (that something would happen), Allah will certainly make it happen".[Muslim].

وعنه قال‏:‏ قال رسول الله صلى الله عليه وسلم‏:‏ ‏ "‏رب أشعث أغبر مدفوع بالأبواب لو أقسم على الله لأبره ‏" ‏ ‏(‏‏(‏رواه مسلم‏)‏‏)‏‏.‏

sunnah.com