Amides having nitrogen atoms of amide groups substituted by hydroxyalkyl or by etherified or esterified hydroxyalkyl groups