Reference: Rowdhatul-‘Uqalaa – Page 35
al-Hilyah – Volume 2/Page 372 – in similar wording
Maalik ibn Deenaar said:
If a man seeks knowledge to act according to it, his knowledge gratifies him, and if he seeks knowledge for other than acting according to it, then his knowledge [merely] increases him in pride and haughtiness.