FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

LinkBack Thread Tools
Old 06-23-2008, 05:25 PM
"Joseph L. Casale"
Default Awk help

I have csvde dump from active directory I process on my postfix mta.
It takes output like this:

"CN=Curtis xxx,OU=Domain Users,OU=xxx xxx,DC=xxx-xxx,DC=local",X400:c=US;a= ;p=xxx xxx xxx;o=Exchange;s=xxx;g=xxx;;SMTP:Cxxx@xxx-xxx.com

and should return a relay_recipient map in the form of:
Cxxx@xxx-xxx.com OK

The command I am using is:
cat $1 | tr -d " | tr ,
| tr ;
| awk -F: '/(SMTP|smtp):/ {printf("%s OK

Everything up to the awk is working, it drops the smtp: but its putting OK's all over the darn place.
Anyone familiar enough with awk and printf that can suggest why this happens?

CentOS mailing list

Thread Tools

All times are GMT. The time now is 04:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org