Sentence:  It means to do it and to <WSD>know</WSD> one is doing it , but as only a secondary if certain effect of the good one primarily does and intends . 
Meaning of the word marked with <WSD> tags:  be cognizant or aware of a fact or a specific piece of information; possess knowledge or information about