Sirach 12:1-9

1 When thou wilt do good know to whom thou doest it; so shalt thou be thanked for thy benefits.
2 Do good to the godly man, and thou shalt find a recompence; and if not from him, yet from the most High.
3 There can no good come to him that is always occupied in evil, nor to him that giveth no alms.
4 Give to the godly man, and help not a sinner.
5 Do well unto him that is lowly, but give not to the ungodly: hold back thy bread, and give it not unto him, lest he overmaster thee thereby: for thou shalt receive twice as much evil for all the good thou shalt have done unto him.
6 For the most High hateth sinners, and will repay vengeance unto the ungodly, and keepeth them against the mighty day of their punishment.
7 Give unto the good, and help not the sinner.
8 A friend cannot be known in prosperity: and an enemy cannot be hidden in adversity.
9 In the prosperity of a man enemies will be grieved: but in his adversity even a friend will depart.

The Brenton translation of the Septuagint is in the public domain.