أَخْبَرَنَا الْحَكَمُ بْنُ نَافِعٍ، أَخْبَرَنَا شُعَيْبُ بْنُ أَبِي حَمْزَةَ، عَنْ ابْنِ أَبِي حُسَيْنٍ، عَنْ شَهْرِ بْنِ حَوْشَبٍ، قَالَ: بَلَغَنِي أَنَّ لُقْمَانَ الْحَكِيمَ كَانَ يَقُولُ لِابْنِهِ: "يَا بُنَيَّ، لَا تَعَلَّمْ الْعِلْمَ لِتُبَاهِيَ بِهِ الْعُلَمَاءَ، أَوْ لِتُمَارِيَ بِهِ السُّفَهَاءَ، أَوْ تُرَائِيَ بِهِ فِي الْمَجَالِسِ، وَلَا تَتْرُكْ الْعِلْمَ زُهْدًا فِيهِ وَرَغْبَةً فِي الْجَهَالَةِ، يَا بُنَيَّ، اخْتَرْ الْمَجَالِسَ عَلَى عَيْنِكَ، وَإِذَا رَأَيْتَ قَوْمًا يَذْكُرُونَ اللَّهَ، فَاجْلِسْ مَعَهُمْ، فَإِنَّكَ إِنْ تَكُنْ عَالِمًا يَنْفَعْكَ عِلْمُكَ، وَإِنْ تَكُنْ جَاهِلًا يُعَلِّمُوكَ، وَلَعَلَّ اللَّهَ أَنْ يَطَّلِعَ عَلَيْهِمْ بِرَحْمَتِهِ فَيُصِيبَكَ بِهَا مَعَهُمْ، وَإِذَا رَأَيْتَ قَوْمًا لَا يَذْكُرُونَ اللَّهَ، فَلَا تَجْلِسْ مَعَهُمْ، فَإِنَّكَ إِنْ تَكُنْ عَالِمًا لَا يَنْفَعْكَ عِلْمُكَ، وَإِنْ تَكُنْ جَاهِلًا زَادُوكَ عَيًّا، وَلَعَلَّ اللَّهَ أَنْ يَطَّلِعَ عَلَيْهِمْ بِعَذَابٍ فَيُصِيبَكَ مَعَهُمْ".
Shahr bin Hawshab said: It has reached us that Luqman the Wise used to say to his son: O my son! Do not learn knowledge in order to boast over the scholars, or to argue with the foolish, or to show off in gatherings through it. And do not abandon knowledge out of lack of interest, nor incline towards ignorance. O my son! Carefully choose the gatherings you attend. So when you see a group remembering Allah, sit with them, for if you are knowledgeable, your knowledge will benefit you, and if you are ignorant, they will teach you, and it may be that Allah bestows His mercy upon them and you receive a share of that mercy. And if you see a group heedless of the remembrance of Allah, do not sit with them, for if you are knowledgeable, your knowledge will not benefit you, and if you are ignorant, they will increase you in helplessness, and it may be that Allah sends punishment upon them and you also taste a portion of it.