There is scarce any man, however, who by discipline, education, and example, may not be so impressed with a regard to general rules, as to act upon almost every occasion with tolerable decency, and through the whole of his life to avoid any considerable degree of blame.
 Adam Smith, The Theory of Moral Sentiments (1759). copy citation

Context

“None but those of the happiest mould are capable of suiting, with exact justness, their sentiments and behaviour to the smallest difference of situation, and of acting upon all occasions with the most delicate and accurate propriety. The coarse clay of which the bulk of mankind are formed, cannot be wrought up to such perfection. There is scarce any man, however, who by discipline, education, and example, may not be so impressed with a regard to general rules, as to act upon almost every occasion with tolerable decency, and through the whole of his life to avoid any considerable degree of blame. Without this sacred regard to general rules, there is no man whose conduct can be much depended upon. It is this which constitutes the most essential difference between a man of principle and honour and a worthless fellow.” source