Sua saída desejada não está clara. Até onde isso te levaria:
awk '
{while (match($0, /rdcPosition: [^ ]*acme#6#[^ ]*/)) {print substr ($0, RSTART, RLENGTH)
$0 = substr ($0, RSTART + RLENGTH);
}
}
' file
rdcPosition: cn=1950,ou=Entities,ou=Active,ou=Vault,o=acme#6#8946
rdcPosition: cn=311982,ou=Entities,ou=Active,ou=Vault,o=acme#6#97
rdcPosition: cn=914570,ou=Entities,ou=Active,ou=Vault,o=acme#6#20
rdcPosition: cn=999546,ou=Entities,ou=Active,ou=Vault,o=acme#6#76
rdcPosition: cn=3513,ou=Entities,ou=Active,ou=Vault,o=acme#6#2802
Para o seu pedido alterado no seu comentário, até onde isso o levaria? Se não estiver satisfeito, por favor, torne-se mais específico para definir o resultado desejado.
awk '
{DN = $1 FS $2
while (match($0, /rdcPosition: [^ ]*acme#6#[^ ]*/)) {print DN, substr ($0, RSTART, RLENGTH)
$0 = substr ($0, RSTART + RLENGTH);
}
}
' file
dn: cn=00fa69bd-bede-4918-a017-b59b0901bb3d,ou=Named,ou=Identities,ou=Active,ou=Vault,o=acme rdcPosition: cn=1950,ou=Entities,ou=Active,ou=Vault,o=acme#6#8946
dn: cn=010903cd-e92d-4307-bffc-4921379153c0,ou=Named,ou=Identities,ou=Active,ou=Vault,o=acme rdcPosition: cn=311982,ou=Entities,ou=Active,ou=Vault,o=acme#6#97
dn: cn=01126aa4-af80-401b-8713-29e360868999,ou=Named,ou=Identities,ou=Active,ou=Vault,o=acme rdcPosition: cn=914570,ou=Entities,ou=Active,ou=Vault,o=acme#6#20
dn: cn=01126aa4-af80-401b-8713-29e360868999,ou=Named,ou=Identities,ou=Active,ou=Vault,o=acme rdcPosition: cn=999546,ou=Entities,ou=Active,ou=Vault,o=acme#6#76
dn: cn=01126aa4-af80-401b-8713-29e360868999,ou=Named,ou=Identities,ou=Active,ou=Vault,o=acme rdcPosition: cn=3513,ou=Entities,ou=Active,ou=Vault,o=acme#6#2802