Follow

awk '{if ($0=="" && route!=""){print route "\t" addrs; route="";addrs="";}else if($1=="cn:"){route=$2;}else if($1=="rfc822MailMember:"){addrs=addrs "," $2;}}' emailroutes.ldifish>emailroutes # Turn the LDAP output text into key value pairs, combining multiple destinations.

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!