It was narrated that Abu Hurairah said:
"The Messenger of Allah said: 'Whoever seeks knowledge in order to argue with the foolish, or to show off before the scholars, or to attract people's attention, Allah will admit him to Hell.'"
English reference: Vol. 1, Book 1, Hadith 260
Arabic reference: Book 1, Hadith 271
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.