awk
doesn't allow you to split quoted strings over two lines, unless you mark each line as a continuation by putting a \
at the end. Since you are already including \n
in the output explicitly, you can just fix things up by putting the continuation markers everywhere a quoted string is split:
awk -v uid=999905284 '
{
print "dn: uid="$0",ou=aaa,ou=bbb,dc=br\n\
uid: "$0"\n\
sn: "$0"\n\
cn: "$0"\n\
mail: "$0"@grupos.a.br\n\
description: "$0"\n\
phpgwAccountType: l\n\
phpgwAccountStatus: A\n\
uidNumber: "uid++"\n\
gidNumber: 0\n\
deliveryMode: forwardOnly\n\
accountStatus: active\n\
defaultMemberModeration: 1\n"
}' list