Some similar verses from Upanishads are
The eighteen persons necessary for the performance of sacrifice are
transitory and not permanent and karma in its nature inferior, has
been stated as resting upon these. Those ignorant persons who delight
in this, as leading to bliss, again fall into decay and
death. (Mundaka Upanishad 1.2.7)
The ignorant following the diverse ways of ignorance, flatter
themselves that their objects have been accomplished. As these
followers of karma do not learn the truth owing to their desire, they
grow miserable and after the fruits of their karma are consumed, fall
from Heaven. These ignorant men regarding sacrificial and charitable
acts as most important, do not know any other help to bliss;
having enjoyed in the heights of Heaven the abode of pleasures, they enter again into this or even inferior world. (Mundaka Upanishad
1.2.9-10)
Into blinding darkness (ignorance) enter those who worship ignorance
(rites). Into greater darkness, as it were, than that enter those
who are devoted to knowledge (the ceremonial portion of the
Vedas). (Brihadaranyaka Upanishad 4.4.10)