Rashi on the Prophets and Writings
Ecclesiastes 6
and it is prevalent among men It affects many men.
riches and property According to its simple explanation, it should be interpreted as its apparent meaning.
and God gives him no power to eat of it that he should rejoice in his portion to find satisfaction in his riches, for he strives to oppress and to accumulate much wealth, as it is said (Hab. 2: 5): “and he is like death and shall never be sated,” and God will also not give him power to perform charity, to eat therefrom in the future, but a strange man will take that money and perform charity with it and derive benefit therefrom. The Midrash Aggadah (Ecc. Rabbah, Yerushalmi Horayoth 3:5) [explains it as referring] to words of Torah.
riches and property and honor Bible, Mishnah, and Aggadah.
gives him no power Since he did not achieve [knowledge of] Gemara, he consequently has no benefit therefrom in any practical instruction.
but a strange man eats it This is the one versed in Gemara.
Should a man beget one hundred children.
and he will have much throughout the days of his years (and much property and all goodness the days of his life). וְרַב is an expression of sufficiency, a sufficient degree of all goodness.
and his soul will not be sated from that good, for he is not happy with his portion, to be satisfied with what is in his hand.
neither did he have burial Sometimes he is slain, and dogs consume him. Now all these things were found in Ahab: he begot many sons, and he had much property, but he coveted the property of others and did not find satisfaction with his money, and dogs devoured him.
the stillborn is better than he [The stillborn] of a woman, for the stillborn comes in vanity and goes; he did not see good and did not desire it; so he need not be distressed.
And if he had lived And if he had lived two thousand years, what advantage would he have, since he did not experience any pleasure? Will he not ultimately return to the dust like all the poor people?
All of a person’s toil is for his mouth, that he should derive benefit and eat in this world and in the next, but this one derived no benefit in his lifetime.
and is the appetite not yet sated This is a question. But this one—did he not even gratify his desire with a small pleasure? [This is] like (Exod. 15:9): “My lust shall be satisfied upon them (תִּמְלָאֵמוֹ נַפְשִׁי),” an expression of attaining a desire, and since this is so.
For what is the advantage [i.e., what advantage] did he have with his wisdom, more than if he were a fool?
What has the poor man a disadvantage over the rich man who has no satisfaction? He too knows how to go along with the living. Another explanation: [7] yet the appetite is not sated for the World to Come, for he did not perform good deeds in his lifetime.
Better is what he sees with his eyes than that which goes to sate his appetite It would have been better and more proper for this person to see his riches with the vision of his eyes, than food and drink, which go into his body.
Another explanation: טוֹב מַרְאֵה עֵינַיִם מֵהֲלָךְ נָפֶשׁ This person prefers and it seems better and more proper for him to follow his eyes, to rob and to oppress, rather than the course of his soul, that he did not put his mind [to realize] where his soul will go when he dies.
this too is vanity It is what is given to the wicked.
What was, its name was already called the esteem and greatness that he had during his lifetime. Its name was already called, i.e., it already was and passed. He already had a name in his office, and now it has passed, and it was made known that he was a man and not God, and his end was that he died, and he will not be able to strive with the angel of death, who is stronger than he.
For there are many things with which he occupied himself during his lifetime, such as the games of the kings: monkeys, elephants and lions. They increased vanity for him, and what will remain for him after he dies?
For who knows For who knows good deeds and what man should do during his life, so that it should be good for him in the everlasting world?
the number of the days of his life of vanity which are few in number.
that he do them those deeds, in the short time that he lives, for this time is as short as the shadow of a passing bird, and although Solomon said, “like a shadow,” in general, and did not specify whether the shadow of a palm tree, or the shadow of a wall, which are permanent, his father David had already specified (Ps. 144:4): “his days are as a fleeting shadow.” This is the shadow of a flying bird. It is interpreted in this manner in the Midrash (Ecc. Rabbah).
for who will tell man how the wealth that he gathered from oppression will remain for his sons after him under the sun?
You arrive at the cited line; the whole work is yours to read around it. The text is set from the cited public-domain edition.