One day Dogen said,
You should know that if you were born into a family following a certain occupation or if you had entered a certain path, you would first have to devote yourself to learning the work of the family or the path. It is no good to study that which has nothing to do with your path or specialty.
Now, since you have left home and joined the family of the Buddha and become monks, you should learn the practice of the Buddha. To learn the practice and maintain the Way is to abandon ego-attachment and to follow the instructions of the teacher. The essence of this is being free from greed. To put an end to greed, first of all, you have to depart from egocentric self. In order to depart from egocentric self, seeing impermanence is the primary necessity.
Many people in the world want to have a good reputation and to be appreciated not only by others but also by themselves. However they are not always well spoken of or praised. If you gradually abandon your ego-attachment and follow the sayings of your teacher, you will progress. If you argue back [pretending] to know the truth, but remain unable to give up certain things and continue to cling to your own preferences, you will sink lower and lower.
For a Zen monk, the primary attitude for self-improvement is the practice of shikantaza. Without consideration as to whether you are clever or stupid, you will naturally improve if you practice zazen.
(Shobogenzo Zuimonki, Book 1-4)
The footnotes to this chapter (by Okumura Roshi?) defines "ego-attachement" as assuming there is an ego existing in the body which is a temporal compound of various elements, thinking it to be eternal or substantial and attaching oneself to that ego. This is a fundamental delusion. Our practice is to see egolessness and the impermanence of all existence, and to live on that basis without greedy desires. Concretely, our desires manifest themselves by seeking fame and profit. This is why Dogen put emphasis on practicing the buddha-dharma only for the sake of the buddha-dharma, without expecting any reward, i.e. fame and profit.
This is one of the key chapters to the entire Zuimonki in that it touches on several of the themes that otherwise run throughout the text - abandonong ego-attachment, seeing impermenance, following a teacher, and practicing shikantaza.