Arabic text
عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ رضي الله عنهما أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «لَا تَعَلَّمُوا الْعِلْمَ لِتُبَاهُوا بِهِ الْعُلَمَاءَ، وَلَا لِتُمَارُوا بِهِ السُّفَهَاءَ، وَلَا تَخَيَّرُوا بِهِ الْمَجَالِسَ، فَمَنْ فَعَلَ ذَلِكَ، فَالنَّارُ النَّارُ».
Translation
Jābir ibn ‘Abdullāh (may Allah be pleased with him) reported: The Prophet (may Allah’s peace and blessings be upon him) said: "Do not seek knowledge in order to show off in front of the scholars, or to argue with the foolish; or to get the higher status in gatherings. Whoever does that, the Fire, the Fire."
Explanation
The Prophet (may Allah's peace and blessings be upon him) gave a warning to those who seek knowledge to show off in front of the scholars and demonstrate that they are also scholars like them; to argue with foolish and feeble-minded people; or to be given prominence and precedence over others in gatherings. Whoever does that becomes worthy of Hellfire due to his showing off and lack of sincerity in seeking knowledge for Allah's sake.
Source: HadeethEnc.com